Find common ancestor of two git branches - this question explains how to show a common ancestor for two branches.
git merge-base branch1 branch2
However, I want to see a common ancestor of three or more branches. At first, I thought this would work.
git merge-base branch1 branch2 branch3 branch4
But it doesn't actually return the common ancestor of all the branches; as noted in the docs
Given three commits A, B and C,
git merge-base A B C
will compute the merge base between A and a hypothetical commit M, which is a merge between B and C
which isn't what I want.
How do you find a common ancestor commit of more than two branches?