Few days ago I tweeted, and Google plus-ed (is that a word?) this neat little Git guide. I really liked it, because it was simple, kept things basic, and condensed all the commonly used commands in one place. Unfortunately the presentation style format meant that while the information it contained was very useful, looking up commands required a lot of scrolling or Ctrl+F’ing. In other words, it was a nice learning guide, but not a good reference material.
What I really needed was a one page sheet I could pin to the cubicle wall on my desk, and consult the next time I forget how to tag a specific commit, drop all local changes and etc.. So for my own convenience, I have decided to distill and your enjoyment I have decided to distil that guide into a bare bones, “most commonly used git commands” cheat sheet. Here is the result:
Bear in mind that this is not supposed to be a comprehensive or completionist reference material. Git is a complex beast, and people have filled entire volumes explaining all of it’s capabilities and use cases. I wanted to include only the commands that a new user would need for regular, day to day work – nothing special, no difficult circumstances. Just basic stuff.
The cheat sheet is naturally a work in progress. I have been toying around with a rough draft version of it here for a few days now. I know that several of my readers here have been using Git much longer, and are much more proficient at it. So here is a question to you: what else should I add there? Am I missing anything useful?
Also, what are your favorite git tricks that you would like to share with people just getting into it, or jumping over from Subversion or Mercurial for example? Let me know in the comments.