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
Very useful, but be careful to commit first if you don’t want to lose your changes
Deletes files that aren’t tracked by Git.
git checkout BRANCH FILE(or directory)
Replaces FILE with the version from
Will overwrite uncommitted changes.