skip to content
Alvin Lucillo

Check common ancestor of two branches

/ 1 min read

Let’s say you created feature branch out of master branch. You made commits on the feature branch, and some created commits on the master branch. At some point, you want to see where they originally diverged, or in other words, the common ancestor the branches have descended. To do that, use the command below:

git merge-base origin/master origin/develop
7e240de74fb1ed08fa08d38063f6a6a91462a815