How do I find what commit a branch originally branched from, after the upstream branch has been rebased?
I often need to rebase several related branches when I pull origin/master:
Before rebasing b1:
O1 - O2 - O3 - O4 - O5 - O6 <=master
\
G - H - I <=b1
\
T - U - V <=b2
After rebasing b1:
O1 - O2 - O3 - O4 - O5 - O6 <=master
\ \
G - H - I G' - H' - I' <=b1
\
T - U - V <=b2
Rebasing b1 required a lot of conflict resolutions. To avoid resolving the same conflicts when rebasing b2, how do I find what commit b2 originally branched from, i.e. I?
rebase forces me to re-resolve all the original conflicts Branch1 had:
$ git checkout b2
$ git rebase # crap!
To avoid that, I want to do is rebase b2 onto the original commit it branched off of, i.e. I. The set of commits I want to apply is I..b2, which means I want to use I as the upstream for rebase (even though it's not a branch anymore). Now I have to specify --onto b1 (otherwise git will apply my changes onto I, which is what I already have).
git rebase --onto b1 I
My question: How do I find I?