Review: Pro Git by Scott Chacon

Submitted by hrm on 12 October, 2009 - 16:17

When I agreed to review this book, through the auspices of HantsLUG, I had almost no experience of using Git. However, I'm an experienced developer, and have used several revision control systems in the past (CVS, Subversion, Monotone). I originally expected the book to be "the pro bits of Git", covering the advanced uses and leaving out the basic parts, so I was prepared to have to do a significant chunk of reading before I could get into this book. That turns out not to be the case.

This relatively slim (250 pages) book is, in fact, a complete tutorial on the use of Git, aimed at the pro, rather than a book on the pro aspects of Git. It takes you all the way from the basic use of Git's simplest features, through to the intimate details of its underlying data storage structures. Chapters 1 and 2 cover the history of Git, installation, configuration, and basic (linear, single-user) usage. Chapters 3 and 5 deal with the issues of branching and merging in stand-alone and distributed environments respectively. Chapter 4 covers setting up Git for use in a distributed environment (hence leading in to chapter 5). The following three chapters give details on customisation, and of various less commonly used tools and capabilities of Git. The final chapter, 9, delves into the internal structures of a Git repository, showing how the high-level commands seen earlier in the book can be constructed from much lower-level commands manipulating the data store directly.

The style of the book is light and approachable, without becoming overly familiar, and flows well between sections and chapters. It builds well, with few forward references. In particular, the chapter on branching strategies is very well explained, with good use of diagrams to cover a complex and hard-to-understand area. It is really this chapter that could make or break the book, and it succeeds well.

I mentioned earlier that the book was "Git, for pros". This is reflected throughout the text. If you aren't already comfortable with collaborating with others in writing software, or you haven't already used a revision control system for doing so, you are probably likely to feel somewhat overwhelmed by the speed of delivery. Chacon covers the material well, and goes into details where they are important, but the pace is fast, and he rarely belabours a point, or spends time on more than one example. For this target audience, it is easy to understand why the author considered putting chapter 9 (on the internals of Git repositories) at the beginning of the book -- it explains a lot about how and why Git works the way it does. However, it is also fortunate that he was persuaded to put it at the end of the book, as much of the elgance of the high-level ("porcelain") Git commands would be lost in the low-level ("plumbing") details.

In summary, this is a good book, offering clear explanations of complex concepts, and giving wide coverage of the overall subject area, from fundamentals through to deep hacking. It is, however, not a book for the novice or inexperienced programmer. If you've written sizable chunks of software before, and you're entirely comfortable with Unix command-line tools, and had experience of developing code in collaboration with other people, then this is the book for you. On the other hand, if you're just starting out in software development, and want to learn about Git, then I would recommend looking elsewhere.

Book details: Pro Git, Scott Chacon, Apress, 2009. ISBN 978-1-4302-1833-3 (paperback)