1. Use commands to find directly
If you have branch A and branch B, use the following command "Http://stackoverflow.com/questions/1549146/find-common-ancestor-of-two-branches"
git merge-base A B
You can view the common parent nodes of these 2 branches
CHUCKLU_ZHCN Branch and Master branch are now available
$ git merge-base CHUCKLU_ZHCN Master
4e67f05995b7d615fce1e97f18deb000d367a6f9
$ git show 4e67f05
Commit 4E67F05995B7D615FCE1E97F18DEB000D367A6F9
merge:6d0e241 1583a81
Author:chucklu <[email protected]>
date:wed Sep 2 09:15:08 2015 +0800
Merge branch ' Epix37/master ' into Chucklu/master
2. Use Gitk-all to view directly with the naked eye
It is important to note that the 2 branches you are looking for are in the non-consolidated state to make sense
Otherwise A and B branches, if a branch has already merged the B branch. Then there's no point in finding this parent node.
The parent node must be the last commit of the B branch
Find a common parent node for 2 branches