Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there an API for GIT (C++ or other languages)

Tags:

A company asked me to program a GIT wrapper for them.

The people there have absolute no versioning systems experience, but it will be incorporated in their daily routine eventually (through my program).

I'm planning on using VC++ to create a tiny windows applet that will help ppl in this process. Any thoughts on that?

What about a Deamon process checking if people want to commit/push their files?

like image 863
Draconar Avatar asked Sep 30 '11 21:09

Draconar


People also ask

Is there a git API?

Libgit2 is a dependency-free implementation of Git, with a focus on having a nice API for use within other programs. You can find it at https://libgit2.org.


2 Answers

For almost (but not all!) use cases, libgit2 is the easiest way to interact with Git repositories via code.

like image 137
Ana Betts Avatar answered Oct 01 '22 08:10

Ana Betts


Git already has two layers: The plumbing (which you may be interested in) on top of which is built the primary porcelain which provides the user interface. If you want to implement something like git-commit but with slightly different semantics all of the underlying programs like git-write-tree and git-rev-parse are there for you to build on.

See also What does the term "porcelain" mean in Git?

like image 36
Ben Jackson Avatar answered Oct 01 '22 07:10

Ben Jackson