How to fix common mistakes in Git

Git is the current commonly accepted form of revision control in the un*x world. If you make a mistake, things can go awfully sideways. Oh Shit, Git! is a guide to fix some common mistakes.