Skip to content
vpfau edited this page Oct 24, 2018 · 1 revision

git-ls-files

Get unmerged files

Git

$ git ls-files --unmerged

LibGit2Sharp

using (var repo = new Repository("path/to/your/repo"))
{
	foreach(IndexEntry e in repo.Index)
	{
		if (e.StageLevel == 0)
		{
			continue;
		}

		Console.WriteLine("{0} {1} {2}       {3}",
			Convert.ToString((int)e.Mode, 8),
			e.Id.ToString(), (int)e.StageLevel, e.Path);
	}
}
Clone this wiki locally