New Book Review: "Version Control with Git (Second Edition)"

New book review for Version Control with Git (Second Edition), by Jon Loeliger and Matthew McCullough, O'Reilly, 2012, reposted here:

Version_control_with_git

Stars-4-0._V192240704_

Solid discussion of Git for someone like me who has primarily been using CVS and SVN (Subversion) throughout their career, and has since started using Git. While I do not view this book as the "train wreck" that the top reviewer here describes, be aware that if you are completely new to version control systems (VCS) you will likely want to look elsewhere (at least for introductory explanations), because the authors jump right into Git usage without first providing much VCS background information.

After a cursory Git introduction, the authors provide what I consider the core of the text (the first 14 chapters of 21), covering installation, how to get started, basic Git concepts, file management, the Git index, commits, branches, diffs, merges, altering commits, the stash, the reflog, remote repositories, repository management, and patches. After this core, the discussion turns to hooks, combining projects, submodule best practices, using Git with SVN repositories, advanced manipulations, tips/tricks/techniques, and use of GitHub (although I decided to skip a couple of these latter chapters, such as the one on hooks, because I do not plan to use this feature in the near future).

Working through this book, I especially appreciated the diagrams (which explain Git objects and commit graphs) and the high number of working examples (of which I recently executed about 90% or so). The diagrams which explain branching and merging are the types of diagrams typical colleagues and I white board with each other to explain a given project state, helping enable both understanding of the material as well as providing future reference for visual depiction.

One of the reasons I decided to go with this book to get more familiar with Git, other than the fact that there are not many Git texts of which to choose in the marketplace, is because it was published relatively recently relative to when I purchased it about a year ago. Unfortunately, a potentially better book called "Pro Git (Second Edition)" that other reviewers have mentioned has since been published, something that happens when a book is not read soon after purchase.

Be aware that while almost every single example that I executed over the course of working through this book ran flawlessly (somewhat of a rarity with technology texts), I did notice on a few occasions that the command line output from a handful of commands was slightly different than what was represented in the material, and I attribute this to a lack of alignment between the Git version that the authors used (1.7.9) and what I used (2.1.4), downloaded as part of Cygwin. However, this aspect did not distract from the material presented by Loeliger and McCullough.

Although the chapter on installation (Chapter 2) does briefly mention the Git version that the authors used, the remainder of the book really does not address this topic apart from a few isolated instances. For example, the chapter on remote repositories (Chapter 12) mentions that differing versions will display a remote-tracking branch differently. When executing another example in the same chapter, I came across a warning that gets displayed when pushing to the depot because the implicit value of "push.default" was changed in Git 2.0 from "matching" to "simple". And although minor, an attempt to clone the 1.5.x branch of SVN referenced in the chapter on using Git with SVN repositories resulted in a "repository moved temporarily" message (the most recent stable version of SVN is currently 1.8.13).

In general, however, this book provides a solid discussion of Git, and these are all but minor annoyances. A review of Git itself is not the purpose of a Git book review, but if you are at a point where you have solely heard about Git from colleagues who recommend that Git should be used because "it's cool" or remark that "all you really need to know are like three commands, don't worry about the other stuff" (I have actually heard developers make these types of comments), diving into Git with regard to what is happening under the covers is arguably the right way to go, and this book can help.

Subscribe to Erik on Software

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe