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); }
We would love to hear about your experience with building client applications in .NET. Your feedback will greatly help us to improve the .NET tooling and ensure our roadmap focuses on your needs. Participate in shaping the future of the .NET client development by taking this short survey (5 minutes to complete).