Skip to content

Glossary: Git Beyond the Basics

git revert

Also written: revert

Undoes a commit by making a new commit that reverses it, leaving history intact. For a merge already on shared main, use `git revert -m 1 HASH`.

Where the book teaches it

Related terms

mainline parentreset