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!
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!