I was doing a big interactive rebase where I was editing something like 8 commits. This is done with git commit --amend
. My issue is that at one point I got a merge conflict which I did not notice, so I kept on naively amending and git rebase --continue
-ing. Apparently I now have amended multiple commits into one, and about 4 of my commits are gone after finishing the rebase. The changes has been amended into other commits.
Is there any way for me to undo these amends, or maybe reapply the commits that are gone?
Of course; one solution is to go back and do the rebase again, but I did quite a lot of edits in the rebase, so I would love to not have to re-do all my work. How I got into this predicament is another story.
Git tree example:
Before rebase: A-B-C-D-E-F
After rebase: A-B-C-F
(C now has changes from D and E amended)