So using LibGit2Sharp https://github.com/libgit2/libgit2sharp you can walk through the branches like this
using (var repo = new Repository(@"path to .git"))
{
foreach (var branch in repo.Branches)
{
Debug.WriteLine(branch.Name);
}
}
But how do I get the current/active branch?
Branch
but you are either behind or ahead of that branch on a fetched remote. – Telemeter