Find the common ancestor for two branches
- Language:: Git
- Type:: Source Control
- Context:: Get source control branch common ancestor
- Description – This gives you the common ancestor, as the title states. It can be used to confirm that the source of the branch is where you think it is, by checking the two likely branches, you can see which one has the most recent log, that is the one where you most probably created the branch from.
$ git merge-base <source branch> <your branch>
$ git log <common sha>