I've been doing a rebase. I've worked on fixing some conflicts but I've ended up going in the wrong direction and now I just want to start again fixing these conflicts.
I'd like to reset the rebase, so that I'm still rebasing the current commit but the working copy has been reset to when the commit was flagged up with conflicts in the first place.
How can I reset a rebase on the current commit?
If you are in between your rebase, you can do
git rebase --abort
First, clear the mess:
git reset --hard HEAD
Then, cherry-pick the commit you are currently rebasing:
git cherry-pick -n `git rev-parse REBASE_HEAD`
That's it. As usual, you will be able to continue the rebase after fixing conflicts.
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