Undo Git Commit
Back to snippetsTo undo a recent local commit, run the following:
git reset HEAD~
Avoid undoing local commits if they have been pushed.
To undo a recent local commit, run the following:
git reset HEAD~
Avoid undoing local commits if they have been pushed.