Git + .NET/Mono = ❤ http://libgit2.github.com
LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET and Mono.
$ git init /d/temp/rooted/path
string rootedPath = Repository.Init(@"D:\temp\rooted\path"); Console.WriteLine(rootedPath);
$ git add --all .
using (var repo = new Repository("path/to/your/repo")) { Commands.Stage(repo, "*"); }
$ git checkout <branch>
using (var repo = new Repository("path/to/your/repo")) { var branch = repo .Branches[branchName]; Branch currentBranch = Commands.Checkout(repo , branch); }