Update: Since I first posted this, I have created a new and (in my opinion) better Git cheat sheet. You might want to have a look at that one.
Today I came across Zack Rusin’s Git cheat sheet (just so we’re on the same page: Git is a really good distributed revision control system). I quite like the idea but unfortunately, Zack’s design is fairly useless to me because
- the colors don’t print well on black and white;
- it’s designed for Letter paper. Letter paper doesn’t exist around here. Give me A4.
While trying to change Zack’s file to address these issues, Inkscape kept crashing on me until I finally gave up and just started from scratch (in – don’t tell anyone – OpenOffice.org Draw). This is the result: Git Cheat Sheet (A4 PDF version).
Here’s a preview:
You will quickly notice that my cheat sheet has a number of differences from Zack’s:
- Less work on design. I concentrated on readability. Rounded corners is all you’ll get from me.
- Different commands. I think some commands from the original selection are not all that regularly used; instead, I included other commands. My list of commands is a lot longer; to make up for that, I omitted lots of explanations. I focussed on explaining things that are not obvious to people who already have experience with more classic revision control systems. The information in my cheat sheet was compiled from Zack’s cheat sheet and the Git user’s manual.
- Additional graph. Because Git’s ideas of commits, working copies and branches are a bit different from those in some other systems, I tried to visualize how it works.
There might be mistakes in the document, or things that can easily be improved on. If you spot any (or have anything else to add), I’d love to hear from you. Anyway, I hope this cheat sheet is useful for you.