--rebase-merges
to be able to reproduce the whole commit tree minus that root commit.git-scm.com/docs/git-rebase#Do⦠is AMAZING.
The rebase-todo language now has labels, resets and merges, and
git rebase --rebase-merges
generates a todo that uses these to faithfully reproduce the git commit tree!Caveats apply:
* It doesn't deal with merge conflicts, so you'll have to resolve those again. Luckily it puts the original merge in REBASE_HEAD, so if you didn't actually change any code you can just
git rm -rf . && git checkout REBASE_HEAD -- . && git rebase --continue
every time it stops to make you resolve a conflict.* Use git 2.25.0 or higher. 2.23.0, which is the latest in anaconda, has a bug where the todo generator generates labels that aren't valid refs, so you'll have to edit the todo until it works.
#HPREp