I have a tree that looks as follows:
A--B (master)
C (newbase)
It contains two branches without common ancestor. Commit C is in fact a baseline for A, a guy who was importing it from old control version system just had forgotten to import it.
I would like to rebase branch so it would look as follows:
C--A--B
I tried
git checkout master
git rebase --onto newbase A -s recursive -Xtheirs
but it results in
C--B
You need to use git rebase --root (plus whatever additional options you like, in this case your --onto and strategy options).
(I have only tested this with interactive rebase, but it is documented as working with all forms of rebase.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With