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:

Git Cheat Sheet Thumbnail

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.

5 Responses to “Git cheat sheet, take two”

  1. John Reese on

    Great sheet. I do like yours better than Zack’s (although I liked the Letter format, but no biggie). But it’s “great great grand-parent”. ;)

  2. Jan on

    John: as the first person to notify me about a mistake (thanks!), you get… a free update of the PDF file (I have replaced the old one). I’m afraid I can’t afford putting expensive gadgets on top of that.
    I suppose I was getting into the habit of writing “great” a little bit too much. Ah well, the internet still is the best spellchecker. ;)

    Next thing I’ll probably want to work on is a Letter version (I can try at least) and a two-sided version with the graphs and some more introductory stuff on one side and the command reference parts on the other.

  3. PJ on

    ever use git-svn ? http://utsl.gen.nz/talks/git-svn/intro.html is a pretty good intro, but it could do with a cheat sheet :)

  4. Jan on

    PJ: I started using it for a project at work. So far it seems fairly straightforward. I’ll see if I can’t put something like that in as well. Perhaps I should start asking people to donate spare time for stuff like this, I don’t seem to have nearly enough.

  5. Git cheat sheet | I wanna spend all your money ... on

    [...] been using git now for quite a while and today I stumbled on a very nice git cheat sheet made by Jan Krüger. If you wanna try git or already use it, you might wanna have this [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note that comments that look like link spam (virtually no content and a link to a shady website) will be removed.