A practical guide to Git — learn by doing, not by reading manuals.
By Dariush Abbasi
Git is the most widely used version control system in the world, yet many developers only scratch the surface of what it can do. This book takes a different approach: instead of long explanations, every concept is taught through clear, runnable examples you can try right now in your terminal.
Whether you're a complete beginner or someone who has been using git add, git commit, and git push for years without really understanding what's happening underneath, this book is for you.
- Appendix A — Git Configuration Cheatsheet
- Appendix B — .gitignore Patterns
- Appendix C — Aliases Worth Having
Every chapter follows the same pattern:
📖 Concept — a short explanation (a few sentences, not pages).
💻 Example — a real command you can run and its output.
🧠 What happened? — a brief note on what Git did behind the scenes.
You'll learn best if you open a terminal alongside this book and type every example yourself.
Found a typo? Have a better example? Contributions are welcome! Please open an issue or submit a pull request at github.com/boringcollege/git-by-example.
This work is licensed under CC BY-SA 4.0. You are free to share, adapt, and build upon this book, even commercially, as long as you give credit and share under the same license.