I am working locally on a branch (master). I previously made a rebase to squash some commits which I thought worked. I continued to make a number of commits until I needed to perform another rebase. When I called git rebase -i HEAD~3 I got the error:
Interactive rebase already started
suggesting that I never properly finished the old rebase.
Now I want to abort the old rebase, without losing any of my changes since it began. I was going to use
git rebase --abort
but I’m pretty sure that will remove all my local commits and put be back before the rebase. What can I do here?
Commit them. Abort the rebase. Pull the commit from
git reflog.Do with it what you will. If your
git reflogexpired (I can’t imagine a situation where this would occur in normal day-to-day operations), cut a new branch then abort the rebase: