Version Control With GIT: Powerful Tools and Techniques for Collaborative Software Development by Jon Loeliger and Matthew McCullough
I’ve started using GIT at work and needed a book to get up to speed with it. Moreover I wanted a book that both explained how GIT works under the covers, and also gave advice on using it for standard problems that I am going to encounter.
This book does all of these things. It explains how GIT actually works, encouraging you to work through some examples of repository creation, and then getting you to create and modify some files and then look at the file system to see how the directory structure and file contents are represented using hash named files. It covers how these are stored in the staging area. In later chapters it covers merging and the various techniques that GIT employs to do these merges, and also remote refs and how they are used to allow the sharing of repositories across machines.
The book is full of useful advice, often showing the commands to set up a scenario where the advice can be used. Before reading it I hadn’t realised that GIT offers so many commands, or even that some of them are optional and depend on logging using the reflog.
Well worth a read of you are new to GIT.