Pro Git
The official Git book by Scott Chacon and Ben Straub, free online and as PDF or EPUB, in many languages. It covers everyday use, branching, remotes, collaboration workflows and GitHub, then the internals that explain why Git behaves the way it does. Read the basics and branching chapters for daily work, then chapter ten on internals, and Git stops being frightening.
2nd edition
git-scm.com · Sept 2026
10 chapters, 3 appendices
git-scm.com · Sept 2026
CC BY-NC-SA 3.0
git-scm.com · Sept 2026
6.6k
GitHub · Sept 2026
Book
Other
Scott Chacon and Ben Straub
2 to 3 weeks
All
Free
What it is
Pro Git is the book published on git-scm.com, Git's official website. The second edition is free to read online and to download as PDF or EPUB under a Creative Commons licence, with a printed edition from Apress. It has full translations in around twenty languages, with more in progress, and is maintained on GitHub with contributions from hundreds of people.
The chapters
- Getting started: version control, installing and configuring Git.
- Git basics: recording changes, viewing history, undoing things, remotes and tags.
- Git branching: branches, merging, remote branches and rebasing.
- Git on the server: hosting your own Git server.
- Distributed Git: team workflows and contributing to projects.
- GitHub: contributing to and maintaining projects on GitHub.
- Git tools: revision selection, interactive staging, stashing, searching, rewriting history, reset demystified, advanced merging, submodules, bundling and more.
- Customising Git: configuration, attributes and hooks.
- Git and other systems: working with and migrating from other version control systems.
- Git internals: objects, references, packfiles, the refspec and transfer protocols.
Appendices cover Git in IDEs and shells, embedding Git in applications, and a command reference.
The chapter that changes everything
Chapter ten, on internals. Most people learn Git as memorised commands, which works until something unexpected happens and there is no model to reason from. Learning that Git is a content-addressed store of immutable objects, and that branches are just movable pointers, turns rebase, reset and reflog from dangerous incantations into understandable operations. The "Reset demystified" section in chapter seven is the other high-value read.
How to read it
- For daily use: chapters 2 and 3, practising each command in a scratch repository.
- For team work: chapters 5 and 6.
- For confidence: chapter 10, then "Reset demystified" and "Rewriting history" in chapter 7.
- As a reference: the rest, when you need it.
The first three chapters take a few evenings with practice. Chapter 10 is an afternoon.
Where it falls short
It is long and mostly text. If you find Git's graph hard to picture, use an interactive visual tool such as Learn Git Branching alongside it. Some sections, such as hosting your own Git server, matter less now that most teams use hosted platforms.
Common questions
Is it really free? Yes, the full book is free online and as downloads under its Creative Commons licence.
Is it up to date? The fundamentals it teaches have not changed. A few newer commands, such as git switch and git restore, may appear less than the older checkout forms, but the concepts are identical.
Best for: every developer who uses Git, particularly anyone who has ever deleted a repository and re-cloned it to escape a Git problem.
Ready to start?
Opens on Scott Chacon and Ben Straub in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.