git revert HEAD

Category: Git - Core

git revert HEAD

Revert the most recent commit

Reverts the most recent commit by creating an undo commit on top.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.