git revert abc1234

Category: Git - Core

git revert abc1234

Create a new commit that undoes a previous commit

Creates a new commit that reverses the changes of a specific past commit — safe because it doesn't rewrite history.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.