0

As the title suggests, namely, how can I know if the remote branch is an ancestor of local branch and vice versa?

Determinant
  • 3,886
  • 7
  • 31
  • 47
  • This may help http://stackoverflow.com/questions/2890659/how-can-i-fast-forward-a-single-git-commit-programmatically – Thell Aug 31 '12 at 04:55

1 Answers1

0

Browse the ancestry of the local branch and see if you encounter the remote branch tip.

You can browse the local branch ancestry with the graph walker (see Repo.get_walker()).

jelmer
  • 2,405
  • 14
  • 27