Master Git's powerful features through interactive demonstrations
Git Hero is a comprehensive collection of Git demonstrations for NG Baguette Conf 2026 - making advanced Git features accessible through simple, practical examples.
This repository contains two complementary approaches to learning Git:
24 focused demonstrations - Each example isolates a specific Git feature:
| Feature | App | Key Learning |
|---|---|---|
| 01-stash | Email Templates | Temporary work storage |
| 02-merge | - | Resolve merge conflicts |
| 03-restore | - | Modern file restoration |
| 04-reflog | Notes App | Recover "lost" commits |
| 05-rebase-interactive | Todo List | Clean commit history |
| 06-fixup | Calculator | Automatic commit squashing |
| 07-reset | - | Understanding reset modes |
| 08-revert | - | Safely undo commits |
| 09-bisect | - | Find bugs with binary search |
| 10-log | - | Search and filter Git history |
| 11-diff | - | View and filter changes |
| 12-worktree | API Docs | Multiple branches simultaneously |
| 13-cherry-pick | - | Select specific commits |
| 14-submodules | Plugin System | Version-pinned dependencies |
| 15-subtree | Main App | Simpler alternative to submodules |
| 16-filter-branch | - | History rewriting |
| 17-rerere | - | Reuse conflict resolutions |
| 18-checkout | - | File-level checkout operations |
| 19-sparse-checkout | - | Partial repository checkout |
| 20-patch | - | Create and apply patches |
| 21-blame | Calculator | Track line-by-line history |
| 22-grep | - | Search code in repository |
| 23-range-diff | - | Compare commit ranges |
| 24-bundle | - | Offline repository transfer |
Each example includes:
- ✅ Complete setup/demo/reset scripts
- ✅ Interactive typewriter-effect demonstrations
- ✅ Comprehensive README with manual exploration guide
- ✅ 3-5 minute presentation time
- Node.js: 18.0.0 or higher
- Git: 2.30 or higher
- Terminal: bash-compatible shell
# Navigate to an example
cd examples/01-stash
# Run the setup (creates git scenario)
./setup.sh
# Run the interactive demo
./demo.sh
# Reset for a fresh start
./reset.shcd examples
# Setup all examples
for dir in */; do
cd "$dir"
./setup.sh
cd ..
done
# Run demos in sequence
for dir in */; do
cd "$dir"
./demo.sh --no-pause # Skip pauses for quick run
cd ..
done- Typewriter Effect: Commands appear character-by-character like a live presentation
- Pausable: Press Enter to advance, or type commands to explore
- Ad-hoc Exploration: During pauses, enter your own commands
- Quick Mode: Use
--no-pauseflag for faster testing
All demos use common utilities from shared/demo-utils.sh:
- Color-coded output (success, info, warning, error)
- Git helper functions (pretty logs, status, diffs)
- Consistent demo flow (start, announce, end)
📖 View Utilities Documentation →
Essential Git skills for daily development:
- Stash (01) - Save work temporarily
- Merge (02) - Resolve conflicts
- Restore (03) - Discard unwanted changes
- Reflog (04) - Git's safety net
- Reset (07) - Understand reset modes
- Revert (08) - Safely undo commits
- Bisect (09) - Find bugs fast
Professional Git workflows:
- Rebase Interactive (05) - Clean history
- Fixup (06) - Smart workflow
- Log (10) - Search history effectively
- Diff (11) - Master change inspection
- Worktree (12) - Parallel development
- Cherry-pick (13) - Selective commits
- Rerere (17) - Auto-resolve conflicts
Advanced repository management:
- Submodules (14) - Version-pinned dependencies
- Subtree (15) - Embedded repositories
- Filter-branch (16) - History rewriting
- Checkout (18) - File-level operations
- Sparse-checkout (19) - Partial repository checkout
- Patch (20) - Create and apply patches
- Bundle (24) - Offline repository transfer
Code investigation and review:
- Blame (21) - Track who changed what
- Grep (22) - Search code efficiently
- Range-diff (23) - Review rebased branches
All 24 examples in numerical order.
- Practice first - Run each demo 2-3 times
- Explain the "why" - Context makes commands memorable
- Use pauses - Allow time for questions
- Show mistakes - Demonstrate recovery techniques
- Adjust speed - Edit
DELAY_BETWEEN_CHARSin shared/demo-utils.sh
# Faster typewriter effect
# Edit shared/demo-utils.sh
DELAY_BETWEEN_CHARS=0.05 # Default is 0.09
# Skip all pauses
./demo.sh --no-pausegit-hero/
├── examples/ # 24 simple, focused demonstrations
│ ├── 01-stash/
│ ├── 02-merge/
│ ├── ...
│ ├── 24-bundle/
│ └── README.md # Master index
├── shared/ # Common utilities
│ ├── demo-utils.sh # Shared functions
│ └── README.md # Utilities documentation
├── git-conf/ # Complex Angular demo (preserved)
│ ├── demo.sh
│ └── ...
└── README.md # This file
MIT
Happy Git Learning! 🚀
Making advanced Git features accessible through simple examples