Skip to Content

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".

browse more comics! get the zine!
read the transcript!

Most mistakes you make with git can be fixed. If you’ve ever committed your code, you can get it back. That’s what the rest of this zine is about!

Here are the dangerous git commands: the ones that throw away uncommitted work.

  • git reset --hard COMMIT
  • Throws away uncommitted changes
  • Points current branch at COMMIT

Very useful, but be careful to commit first if you don’t want to lose your changes

  • git clean

Deletes files that aren’t tracked by Git.

  • git checkout BRANCH FILE (or directory)

Replaces FILE with the version from BRANCH.
Will overwrite uncommitted changes.

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)