Skip to content

Undo the last commit

Raw

Keep the changes in the working tree:

Terminal window
git reset --soft HEAD~1

Throw them away as well:

Terminal window
git reset --hard HEAD~1