Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, Oh Shit! Git!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript". get the zine!
read the transcript!

If you made a mistake but want to keep all of the commits since then, git revert is your friend!

git revert will create a reverse patch for the changes in a commit and add it as a new commit.

  1. Find the commit SHA for the commit you want to undo.

  2. Run: git revert SHA

  3. Enter a commit message for the revert commit.

Now all of the changes you made in that commit are undone!

person: this is super useful if you push a bad commit to a shared repository and need to undo it!