You just joined a small team. The codebase is small. The team moves fast. Your tech lead left a bunch of branches half-done before going on vacation.
Your mission: learn git by shipping features, resolving conflicts, and keeping history clean — exactly like on a real team.
Fork this repo on GitHub (use the Fork button — pushes in the exercises go to your fork, not the original), then clone your fork:
git clone [email protected]:<your-username>/git-playground.git
cd git-playground
git fetch --all # pull down all practice branchesThen open exercises/01-remotes.md and follow along in order.
| # | Topic | File |
|---|---|---|
| 1 | Remotes — clone, fetch & origin | 01-remotes.md |
| 2 | Basics — add, commit, status, log | 02-basics.md |
| 3 | Branching — branch, switch, push | 03-branching.md |
| 4 | Merging — merge, conflicts | 04-merging.md |
| 5 | Rebasing — rebase, interactive rebase | 05-rebasing.md |
| 6 | Cherry-pick — copy commits | 06-cherry-pick.md |
| 7 | Undoing — restore, reset, amend, revert, reflog | 07-undoing.md |
| 8 | Bisect — binary search for bugs | 08-bisect.md |
| 9 | Stash — save work without committing | 09-stash.md |
| 10 | Blame & Log — find who changed what | 10-blame-log.md |
- Almost every chapter ends with a Challenge — a hands-on checklist to practice what you just covered
- Quick reference → CHEATSHEET.md has every command in one table
| File | What it is |
|---|---|
src/app.js |
Main app entry point — edit freely during exercises |
src/utils.js |
Utility helpers — edit freely during exercises |
| Branch | Used in | Purpose |
|---|---|---|
feature/tip-calculator |
Exercise 4 | New feature — practice fast-forward merge |
feature/user-profiles |
Exercises 4 + 5 | Diverged history — practice 3-way merge + rebase |
feature/homepage |
Exercise 4 | Intentional conflict — practice resolution |
feature/search |
Exercise 5 | Practice rebase --onto |
old-base |
Exercise 5 | Old base for feature/search — rebase --onto reference point |
hotfix/menu-typo |
Exercise 6 | Small fix commit — practice cherry-pick |
practice/find-the-bug |
Exercises 8 + 10 | 8 commits with a bug — practice bisect and blame |
