Pragmatism in the real world

Pragmatic Version Control Using Git

I’ve recently been looking at different version control systems, specifically distributed ones like git, Bazaar and Mercurial. At IPC I was talking to Travis Swicegood about wanting to learn and he very kindly organised a copy of his book for me to review and learn from.

I didn’t know much about git at all before reading the book. I do now :)

It turns out that git is fairly easy when you have a good explanation of how to use it. The book starts from the basics of what version control is, which I already knew. It was good to see equal coverage of how to set up git in Windows, OSX and Linux. I was aware that Windows support wasn’t prime-time, but at least doable with msys.

The bulk of the book covers how to actually use git and this is where I learnt enough about git to actually understand it. There were two main surprises for me:

  • You need to re-add a modified file every time you want to commit it. This puts it in the staging area. Fortunately the -a switch to git add will auto-add for you!
  • Directories are not stored under version control. It’s like CVS :)

Other than that, it’s just like Subversion, only faster! (You also have that distributed thing going on.)

I suck at reviewing.

Pragmatic Version Control Using Git is a very good book if you want to learn git.

It’s even better as a reference book as you can actually find things in it too.

If you want to know all there is to know about git, then get this book.

Even the paper feels good in your hand when you turn the page.

3 thoughts on “Pragmatic Version Control Using Git

  1. Hey Rob,

    Great review!

    If you manage to get a git-svn clone of the Zend Framework repository working could you let us know?

    I tried following the instructions in the book, and those on Matthew's site:

    http://weierophinney.net/matthew/archives/222-Cloning-the-ZF-SVN-repository-in-Git.html

    …but I couldn't quite get it to checkout just a recent revision.

    (I kept getting the whole history or nothing at all.)

    I reckon with your clear style we might have more luck.

    TIA ;-)

  2. Personally I keep finding parts of Git confusing. However, the help files are good, and there's a variety of books available, so usually I can eventually figure it out.

    It does work 100% fine for me on Windows – I even found out you can do a really really easy shared repo setup by creating a bare git repo and using Windows' network folder sharing to share it. Anyone can then push/pull from it. Works like magic if you ask me =)

  3. I've never really used git. I found it hard to understand. Maybe I should read the book.

    We've been using bazaar for almost a year now at work (as replacement of SVN) and it works. But it's seriously lacking on some points (line ending conflicts for instance :S) I've been using hg for a while now and I must say it feels a lot more stable then bazaar.

Comments are closed.