<p>Imagine you've made a commit and want to undo it, or a particular commit is causing issues in production and you want to roll it back.</p>
<p>Instead of having to change it back manually, <code>git revert</code> can do it for you.</p>
<p>You specify the commit SHA you want to revert and Git will automatically try and revert that commit.</p>
<p>It creates its own commit message which includes the original commit message and <a href="/daily/2024/05/20/referencing-other-commits-in-commit-messages">the reverted commit SHA</a>, so you can easily find or navigate to the original commit.</p>
<p>It creates its own commit message which includes the original commit message and <a href="/daily/2024/05/20/referencing-other-commits-in-commit-messages">the reverted commit SHA</a>, so you can easily find or navigate to the original commit.</p>