Revision control is a practice that tracks and provides control over changes to source code. It is a critical tool in the developer’s tool chain. Git is a distributed revision control system initially designed and developed by Linux Torvalds for Linux kernel development. It is used on many kernel-related projects besides the Linux kernel such as OpenVZ, KVM, ALSA, and udev. Git is also frequently used for source code management for non-kernel projects.
Git is the most widely used version control system, in part because of the popularity of GitHub, a web-based Git repository hosting service, which offers all of the distributed revision control and source code management) functionality of Git as well as adding its own features.
Git is a popular choice for revision control because it is fast, stable, flexible, and extremely powerful. It offers a comprehensive feature set, an active development team, and a number of free hosting communities. It’s a reliable versatile multipurpose revision control tool whose extraordinary flexibility makes it tricky to learn, let alone master. Hence the need for some great free books.
The books featured in this article are all available for free, and many of them are released under an open source license. Some of the text are designed for beginners, others help developers get to grip with the somewhat ugly internals of Git. So get reading, learning and sharing code.
1. Pro Git by Scott Chacon and Ben Straub
Pro Git (Second Edition) is a fully-updated guide to Git and its usage in the modern world. With this book you’ll learn how to master the world of distributed version workflow, use the distributed features of Git to the full, and extend Git to meet your every need.
Git has come a long way since it was first developed by Linus Torvalds for Linux kernel development.
It has taken the open source world by storm since its inception in 2005, and this book teaches you how to use it.
This book provides a wealth of information on:
- Getting Started – offers some background on version control tools, how to get Git running, and how to configure Git.
- Git Basics – covers every basic command you need to do the vast majority of the things you’ll eventually spend your time doing with Git.
- Git Branching – helps the reader fully understand the way Git does branching.
- Git on the Server – discusses the four major protocols that are used: Local, HTTP, Secure Shell (SSH) and Git.
- Distributed Git – examines how to utilize some of the distributed workflows.
- GitHub – helps you get up to speed with GitGub, the single largest host for Git repositories.
- Git Tools – revision selection, interactive staging, stashing and cleaning, signing work, searching, rewriting history, reset demystified, advanced merging, rerere, debugging with Git, submodules, bundling, replace, and credential storage.
- Customizing Git – see how you can make Git operate in a more customized fashion, by introducing several important configuration settings and the hooks system.
- Git and Other Systems.
- Git Internals.
The electronic version of this book is licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0 license.
2. Git Internals by Scott Chacon
Git Internals explains the internal working of the Git source code control system.
The book covers the following topics:
- Installing Git – a brief introduction for installing Git on the Linux, Mac, and Windows operating systems.
- Understanding Git – covers what Git was built for and how it works. It will help you understand what Git is designed to do a fundamental level.
- Using Git – presents some of the basic commands to master Git.
- Commands Overview.
The book is released under an open source license, the Creative Commons Attribution-ShareAlike license.
3. A Hacker’s Guide to Git by Joseph Wynn
A Hacker’s Guide to Git explains some of Git’s core concepts including basic object storage, commits, branches and tags.
It also contains in-depth explanations about the different kinds of merging in Git, including the much-feared rebase.
While this book can be read without charge, it isn’t published under an open source license.
The contents of the book:
- Repositories – a starting point to understand what is stored in a Git repository: Blobs, Tree objects, Commit objects, Tag objects, and References.
- Tree Objects – contains a list of blobs (files) and other tree objects (sub-directories).
- Commits – see a commit object in action.
- References – a file stored somewhere in .git/refs, containing the hash of a commit object.
- Branches – brief coverage of what is one of Git’s strongest features.
- Tags – two types of tags in Git — lightweight tags and annotated tags.
- Merging – the process of joining two histories (usually branches) together.
- Rebasing – understand what rebasing does.
- Rebasing (Continued).
- Remotes: Cloning, Pushing, Remote-Tracking Branches, Fetching, Pulling.
- Toolkit: git-reflog, git-fsck, git-stash, git-describe, git-rev-parse, and git-bisect.
Next page: Page 2 – Conversational Git and more books
Pages in this article:
Page 1 – Pro Git and more books
Page 2 – Conversational Git and more books
Page 3 – Git from the Bottom Up and more books
Page 4 – Git Succinctly and more books