I have some customer branches and one development branch. Every now and then the customer branches are merged back into the development branch. For an Update, the development branch is merged into the customer branch which got the Update.
Now I want to find out, What was the last update-merge, or what was the last merge between the development and the customer branch.
If I have for example the following history:
o---o---o---o---o---o c1
/ \
o---1---o---2---o---o---3---o dev
\ / \ / /
o---o---o---o---o---o c2
In this example, I want to find the last merge from dev
to c2
which is 2.
I found git merge-base
from this answer, but this gives me 3 as it is the last commit which is in both branches.
I also tryed to look at the commits, which are in dev
but not in c2
, but then I also got a lot of old commits from c1
.