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

There's already TortoiseGit, among other "friendly" interfaces. Don't re-invent the wheel, start by researching what's already available.


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


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?