Sim*_*mon 16 .net git libgit2sharp
所以使用LibGit2Sharp https://github.com/libgit2/libgit2sharp你可以像这样走过分支
using (var repo = new Repository(@"path to .git"))
{
foreach (var branch in repo.Branches)
{
Debug.WriteLine(branch.Name);
}
}
Run Code Online (Sandbox Code Playgroud)
但是如何获得当前/活动分支?