We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
$ git merge-base oneCommit secondCommit
public string GetMergeBase(string a, string b) { using (var repo = new Repository("path/to/your/repo")) { var aCommit = repo.Lookup<Commit>(a); var bCommit = repo.Lookup<Commit>(b); if (aCommit == null || bCommit == null) return null; var baseCommit = repo.ObjectDatabase.FindMergeBase(aCommit, bCommit); return baseCommit != null ? baseCommit.Sha : null; } }