Use Git? Print Out A Cheat Sheet

When I was a lone coder, I was able to get away with using Perforce for source control, however, when I made the move to commercial games development, I had to switch to something that would support multiple users. I made the decision to use Git over SVN and while I can manage most of the time using TortoiseGit to handle commits, syncs and branches, I do have to head to the command line for the more complex operations.

Usually I type my quandary into Google and a solution is eventually revealed, but it's nice not to have rely on a search engine to get my answers. I've also become somewhat dependent on a combination of online resources and TortoiseGit that I don't actually know the intricacies of Git.

Basically, I'm terrified of using the source control's more powerful features, lest I turn the repository into a giant mess. True, I could always delete the entire thing and re-clone, but I'd rather stick to the basics and be productive, than stuff around with functionality I don't need (not right now, anyway).

That said, I would like to know a little more about Git's inner workings and be more fluent with the command line, so I'm going to try and rely less on TortoiseGit's context menus. The first step is using a cheat sheet so these commands and their common arguments are available at a glance, the hope being once entered enough times, they'll stick around in my head.

This one, from Git Tower, not only includes a number of often-used Git actions, but a second page with some recommended best practises. There's also this one from Zack Rusin that shows the usual flow of commands. Finally, if printing just isn't your thing, NDP Software has an interactive one that lets you drill down into certain aspects of Git and their related commands.

Whichever one you go with -- or none at all -- it's always good to fire up a terminal once in a while and keep your command line skills fresh. I know I don't do it anywhere near often enough.

Git cheat sheet [Tower Git, via Six Revisions]


    I, for one, would certainly like to see more of these. I went looking for Ruby and also for Rails cheat sheets the other day and there were lots of them. Its sure is handy to have some recommended.

    The advice to not commit until complete is stupid. There is nothing wrong with commit to your local topic branch whenever you need to, particularly if you develop on multiple systems (eg desktop and laptop) and need to pull from each when you switch machines. Just rebase to squash your commits into one atomic commit to merge/rebase -ff to into main development branch and then push to remote.

Join the discussion!

Trending Stories Right Now