Create a commit that undoes an earlier commit.
Section: Undo, Reset, Revert, and Recovery
Revert commit
bash
bash
git revert <commit_sha>Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Undo, Reset, Revert, and Recovery