Q:

run git commands in program

We developed an ide we want to implement some git functions in this ide. like in visual studio.
http://blogs.msdn.com/b/visualstudioalm/archive/2013/02/06/set-up-connect-and-publish-using-visual-studio-with-git.aspx
I try to use gitlib2 but it has some problems in windows. How can I run commands in git? is there any examples in c, CPP?
Thanks

A:

We developed an ide we want to implement some git functions in this ide. like in visual studio.

Visual studio relies on LibGit2Sharp, a .Net binding to libgit2 to interact with local and remote git repositories. More on the underlying architecture in Martin Woddward's talk at TechEd 2013.
Of course, depending on the language your IDE is built with you may choose to pick another binding (ruby: Rugged, python: Pygit2, ...). You can find more information about existing bindings on the libgit2 project page. 

is there any examples in c, CPP?

If you're looking for some libgit2 sample usage, this StackOverflow question may help you.

I try to use libgit2 but it has some problems in windows.

The libgit2 team is always on the lookout to fix those kind of issues. Indeed, one of the libgit2 moto is to be "100% cross-platform". Please let them know about your issues by creating some entries in the issue tracker

