How to find the most recent common ancestor of two Git branches?
You are looking for git merge-base. Usage:
git merge-base
$ git merge-base branch2 branch3 050dc022f3a65bdc78d97e2b1ac9b595a924c3f2
2.1m questions
2.1m answers
60 comments
57.0k users