Skip to content

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
  1. 01What Git is and how version control works
  2. 02Connecting Git to GitHub and understanding .gitignore
  3. 03Everyday beginner workflows: diffs, commit messages, and Pull Requests
  4. 04Setup and modern ~/.gitconfig defaults
  5. 05Starting, cloning, and ignoring files
  6. 06The three trees: working tree, staging area, and commits
  7. 07Inspecting diffs, logs, and blame
  8. 08Branches and switching
  9. 09Merging and resolving conflicts
  10. 10Rebasing, squashing, and cherry-picking
  11. 11Stashing work in progress
  12. 12Remotes, syncing, and safe force pushing
  13. 13Undoing mistakes and emergency recovery
  14. 14Tagging, patching, and archiving
  15. 15Finding regressions with git bisect
  16. 16Parallel branches with git worktree
  17. 17Maintenance, large repos, submodules, and hooks
  18. 18Pull requests, merge strategies, and stacked branches
  19. 19How Git works inside .git/ (blobs, trees, commits, and refs)
  20. 20Cleaning leaked secrets and rewriting history safely
  21. 21Appendix: Legacy-to-modern Git translation
  22. 22Everyday Git quick reference cheat sheet
  23. 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.