Learning git – the version control Swiss army knife

git is my revision control system of choice. It is immensely powerful and fast but it does have a downside, it’s pretty hard for new users to learn.

Recently I was asked, “what’s the best way to learn git”. I thought a little while, scratched my head some, and said I’d get back to them.

Anyway, I thought the solution I came up with could benefit others so here it is.

There is a wealth of documentation on the Internet, what git is, some beginner tutorials, even lists of useful tips so what is the best way to learn git? Well here is what I think you should do.

Must Reads

  • Go read Git Magic by Ben Lynn, an excellent ‘book like’ introduction to git. Its 37 pages long (PDF version) so its no quick read but for me, its absolutely essential.
  • For its explanation of the 20 most common git commands you will possibly use on a day to day basis, this document gets put on my ‘must read’ list.
  • Print this cheat sheetout and keep it by you keyboard always.
  • For more advanced tips, checkout this wiki page
  • and finally, if your not sick of reading by now, there are lots more links on the git documentation page.

    Of course, none of the above information is useful unless you actually use the tool so fire up your terminal and play around.


    One other thing that may be useful is my ~/.gitconfig file. I’ve simplified it somewhat but the useful parts are below.

    ~/.gitconfig is the configuration file for git where you can customize git to your hearts content. For a list of available options have a look at the man page for gitconfig or view it online here.

    name = Jamie Bennett
    email = jamie@linuxuk.org
    ci = commit -a
    co = checkout
    st = status -a
    di = diff
    br = branch
    cl = clone
    me = merge
    pa = log -p
    whitespace = strip
    color = auto
    rename = copy
    color = true
    color = auto

    Hope that helps.


    0 Responses to “Learning git – the version control Swiss army knife”

    1. Leave a Comment

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s

    %d bloggers like this: