Let's Learn Git!
Git is everywhere — in every team, every deployment pipeline, and every AI coding tool. Yet most developers learn it by memorizing commands without understanding what happens underneath.
This tutorial takes a different approach. You learn the concepts first — how Git stores data, how branches actually work, what a merge really does — then apply that understanding through exercises and a 17-recipe playbook you can reach for every day.
Why This Tutorial
- Concepts before commands — understand the object model, references, and the index so that every command makes sense instead of feeling like magic.
- Structured learning path — not a cheat sheet, not a wall of text. Nine chapters that build on each other, with exercises and quizzes to check your understanding.
- Practical playbook — 17 recipe pages covering everyday tasks, branching, remotes, debugging, and more. Look up what you need, copy the commands, understand why they work.
- Foundation for AI workflows — tools like Claude Code, Cursor, and Copilot use Git under the hood. AI works best when you know what you're asking for — understanding Git internals helps you work with these tools effectively and catch mistakes.
What You'll Learn
- How Git works — the workspace, index, and repository pipeline that every command builds on.
- Building blocks — objects, references, HEAD, and how Git stores your project history internally.
- Branching and merging — work on features in isolation, merge strategies, conflict resolution, cherry-pick, rebase, and stash.
- Remote collaboration — clone, push, pull, fetch, and forking workflows for team projects.
- Expert topics — configuration, selectors, refspecs, hooks, bisect, and history rewriting.
Chapters
| Chapter | What you'll learn |
|---|---|
| Introduction | What Git is, installation, how it works, command overview |
| Building Blocks | Repositories, objects, references, HEAD, tags |
| Branching and Merging | Branches, merge strategies, rebase, cherry-pick, conflicts, stash |
| Remote Repositories | Clone, push, pull, fetch, remote tracking, forking workflows |
| Nested Repositories | Submodules and subtrees for managing dependencies |
| Expert Topics | Configuration, selectors, refspecs, hooks, bisect, rewriting history |
| Playbook | Step-by-step recipes for common Git tasks |
| Appendix | Merge strategies, SSH setup, Git clients, references |
| Glossary | Key terms and definitions |
About
This tutorial started as personal memo pages — quick notes I wrote for myself because I kept forgetting how Git works. Over time, those notes grew into Markdown documents, then chapters with diagrams and exercises, then an Astro site with quizzes, a 17-recipe playbook, and the structured tutorial you see now. More than 200 hours of writing, rewriting, and refining.
If it helps you understand Git a little better, it was worth every hour.
- Created by Branimir Georgiev and Marwan Rashed
- Part of Code with Branko — practical tutorials for developers by heart
Further Reading
- Pro Git Book — the definitive reference
- Git Internals — deep dive into Git's object model
- Flight Rules for Git — what to do when things go wrong
- Think Like (a) Git — graph theory perspective
- Learn Git Branching — interactive branching exercises