%% date:: [[2024-01-05]] parent:: %% # [[Reverting a commit in Git]] Reverting a commit in [[Git]] means adding another commit that is the exact opposite of that commit. The result is that what you would have had if that commit had not been made, but it doesn't actually *delete* the commit; the commit will still be recorded, but will effectively be cancelled out. To do a revert in git, you can do: ```shell git revert HEAD ``` That will prompt you to create a commit message for the new commit.