gitfoo — A curated dojo of Git's most powerful hidden gems, each one executable and unforgettable.
Most developers use about 10% of Git. This repo is the other 90%.
Every episode uses a real app (tasks.py — a simple CLI task manager) as the sparring partner.
You run the demos, you see the magic, you never forget the technique.
The App: GitFoo Tasks
python tasks.py add "Learn git worktree" python tasks.py list python tasks.py doing 1 python tasks.py done 1 python tasks.py stats
A dead-simple task manager. Just enough code to make every Git demo real.
Episodes
Each episode lives in episodes/ with a guide (.md) and a runnable demo script (.sh).
| # | Episode | Git Gem | Mind-Blow Level |
|---|---|---|---|
| 1 | Worktrees | git worktree |
🤯🤯🤯 |
| 2 | Bisect | git bisect |
🤯🤯🤯 |
| 3 | Reflog | git reflog |
🤯🤯 |
| 4 | Rerere | git rerere |
🤯🤯🤯🤯 |
| 5 | Stash Kung Fu | git stash (advanced) |
🤯🤯 |
| 6 | Hooks | git hooks |
🤯🤯 |
| 7 | Log Archaeology | git log (forensics) |
🤯🤯🤯 |
| 8 | Power Tools | notes, archive, shortlog, format-patch |
🤯🤯 |
How to Use This Repo
# Clone it git clone <this-repo> && cd gitfoo_episode_1 # Pick an episode cat episodes/01-worktrees.md # Run the demo bash episodes/demos/01-worktrees-demo.sh
Each demo is self-contained — it sets up whatever state it needs, runs the Git commands, and shows you the results. Safe to run, safe to re-run.
Philosophy
- Show, don't tell. Every technique has a runnable demo.
- Real code, not toy examples. The task app is simple, but it's real.
- Muscle memory > memorization. Run the demos yourself.
- One technique, one episode. No overload.
Requirements
- Git 2.20+ (for full feature support)
- Python 3.7+
- A terminal with bash/zsh
Train hard. Commit often. Push with purpose. 🥋