Git Handbook
Start from scratch with what version control does, your first commit, connecting to GitHub with SSH, .gitignore, reading diffs, and opening Pull Requests.
Then build confidence with modern Git 2.54 commands (git switch, git restore, zdiff3 conflicts), interactive rebasing, reflog recovery, git bisect, parallel worktrees, and safety-tagged quick-reference tables.
Table of contents
23 chapters- 01What Git is and how version control works
- 02Connecting Git to GitHub and understanding .gitignore
- 03Everyday beginner workflows: diffs, commit messages, and Pull Requests
- 04Setup and modern ~/.gitconfig defaults
- 05Starting, cloning, and ignoring files
- 06The three trees: working tree, staging area, and commits
- 07Inspecting diffs, logs, and blame
- 08Branches and switching
- 09Merging and resolving conflicts
- 10Rebasing, squashing, and cherry-picking
- 11Stashing work in progress
- 12Remotes, syncing, and safe force pushing
- 13Undoing mistakes and emergency recovery
- 14Tagging, patching, and archiving
- 15Finding regressions with git bisect
- 16Parallel branches with git worktree
- 17Maintenance, large repos, submodules, and hooks
- 18Pull requests, merge strategies, and stacked branches
- 19How Git works inside .git/ (blobs, trees, commits, and refs)
- 20Cleaning leaked secrets and rewriting history safely
- 21Appendix: Legacy-to-modern Git translation
- 22Everyday Git quick reference cheat sheet
- 23Where to go from here
Get the Git Handbook for free: subscribe to my newsletter and I'll send it your way, together with all my other free programming ebooks.
Want the whole collection? See all my free ebooks.
By subscribing you agree to receive my newsletter (new tutorials, book releases, and courses). You can unsubscribe anytime from the link at the bottom of every email. Your email is the only data collected, stored securely in the EU, and never shared.