We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Accidental Commit

You know how with merge conflicts you commit the resolution, but with rebase conflicts you --continue the resolution?

I cannot tell you how many times I have accidentally committed the resolution of a rebase conflict...

How to Undo the Screw-Up

If you accidentally commit the resolution of a rebase conflict, just:

git reset --soft HEAD~1

The --soft flag will keep your changes, and just undo the commit. Then you can simply --continue the rebase as normal.