Pro Git - Scott Chacon

This is available online, and that's the form I'm reading. It's a good book, and I'm pretty tempted to get the print version, even though it's largely tutorial material.

As I sometimes do, most of this review will not be to do with the book itself, but with the subject of the book. I've been using the "git" source control system at home for some time now. However, I've been using it in a style that would hardly exert CVS, let alone Subversion, so I hadn't picked up much of git. Moreover, git is intimidating. You really want to understand the way git works if you're using it, and there's an awful lot of writing about it on the web, but no clear place to start. At one point, I had a web browser full of tabs into various odds and ends of documentation, but I was still completely lost.

Work brought matters to a head. A new guy was playing around with putting our work svn history into git for his own reasons, and it seemed to work well enough that we're having a pilot, with a view to our team switching. As I'm one of the early adopters, others are likely to ask me how to do the stuff, and I really should understand it!

I started off with John Wigley's Git from the bottom-up, which starts with the internal model used by git. This wasn't going to be terribly useful for day-to-day interaction, but made me rather more comfortable with git's philosophy, and was a good foundation for learning how to use it day-to-day.

That day-to-day learning is where this book comes in. I don't think Wigley's paper is anything like a necessary pre-requisite, it just happened to suit me very well, as I've got a particular "data structures and algorithms" mindset.

Scott Chacon clearly does a whole bunch of git stuff. From the book, he's a dev who started helping other people with git, then ended up doing bigger presentations, went through a number of iterations, and ended up with this book. And... that seems about right. The book is extremely readable, and has a balance and structure that demonstrates he's got plenty of experience explaining git to new people. It doesn't get bogged down, but when it gets to the trickier stuff it pulls up big examples. Gotchas and weirdnesses are fully explained.

The book is structured well, starting with basic usage, moving on to more complex usage, moving over to administration and funky stuff, and then finishing off with a guide to the internals. That part perhaps overlaps with Wigley's paper, and interestingly the blurb at the start of the chapter admits that it's out of the way to avoid scaring people, but could happily be brought forward for those who want to take an internals-driven approach. The structure works well, and again speaks for Chacon's teaching skills.

One of the things that had previously worried me about git is people talking about how it didn't fit their mental model, that it did things weirdly etc. Given the impenetrable wall of internet documentation, things didn't look good. Having read about it and understood it, these fears have completely evaporated. The underlying storage design is simple, the basic workflows built on top are logical, and the tools themselves are actually surprisingly helpful given the complex possibilities they cover.

(Scott's book points out that historically it wasn't so pleasant to use. Oh, the advantages of being a late adopter!)

That underlying simplicity is very powerful. Git went from nothing to hosting itself and Linux in a few months. That simplicity allowed it to reach that state and be driven by usage very quickly, and that model has scaled all the way to what git is today. This is what makes me think that Linus really is exceptional. You might get one big project by chance, especially if it's "Build a clone of a well-understood 20-year-old operating system", but when you develop multiple blockbuster pieces of software from scratch... it probably isn't a fluke.

Posted 2014-03-12.