18 standalone demonstrations of powerful Git features, each taking 3-5 minutes.
Perfect for learning, teaching, and presenting at conferences!
Examples are organized by presentation track - see oral.md for the complete 1-hour presentation guide.
| # | Feature | App | Key Learning | Time |
|---|---|---|---|---|
| 01 | Stash | Email Templates | Save work temporarily without commits | 3-4 min |
| 02 | Merge | Shopping Cart | Resolve merge conflicts effectively | 3-4 min |
| 03 | Restore | File Operations | Modern file restoration commands | 4-5 min |
| 04 | Reflog | Note Taker | Recover "lost" commits | 3-4 min |
| # | Feature | App | Key Learning | Time |
|---|---|---|---|---|
| 05 | Rebase Interactive | Todo List | Clean up commit history | 4-5 min |
| 06 | Fixup | Calculator | Mark commits for automatic squashing | 3-4 min |
| 07 | Reset | Reset Modes | Understand --soft, --mixed, --hard | 4-5 min |
| 08 | Revert | Safe Undo | Safely undo commits without rewriting history | 4-5 min |
| # | Feature | App | Key Learning | Time |
|---|---|---|---|---|
| 09 | Bisect | Number Guesser | Find bugs automatically with binary search | 3-4 min |
| 10 | Log | History Search | Search and filter git history | 4-5 min |
| 11 | Diff | Diff Viewing | Master viewing changes | 4-5 min |
| # | Feature | App | Key Learning | Time |
|---|---|---|---|---|
| 12 | Worktree | API Docs | Work on multiple branches simultaneously | 4-5 min |
| 13 | Cherry-pick | Weather CLI | Select specific commits across branches | 3-4 min |
| 14 | Submodules | Plugin System | Version-pin external dependencies | 4-5 min |
| 15 | Subtree | Shared Utils | Simpler alternative to submodules | 4-5 min |
| 16 | Filter-branch | Logger | Rewrite history to remove files/secrets | 4-5 min |
| 17 | Rerere | Recipe Book | Reuse recorded conflict resolutions | 4-5 min |
| 18 | Checkout | File Operations | Legacy file-level operations | 3-4 min |
Before running any example:
- Node.js: 18.0.0 or higher
- Git: 2.30 or higher
- Terminal: bash-compatible shell
- Time: 3-5 minutes per example
Check your versions:
node --version # Should be v18.0.0+
git --version # Should be 2.30+Each example is completely self-contained with its own Git repository.
cd {example-directory}
./setup.sh # Initialize demo scenario (creates commits, branches, etc.)
./demo.sh # Run interactive demonstration with typewriter effect
./reset.sh # Clean up for next run# Try the stash example (first in presentation order)
cd 01-stash
./setup.sh
# ✅ Setup complete!
./demo.sh
# Interactive demo begins...
# Press Enter to advance through steps
# Or type commands to explore on your own
./reset.sh
# 🔄 Reset complete!Disable pauses and typewriter effect for faster testing:
./demo.sh --no-pause# Run demos in presentation order (Block 1: Daily Workflow)
for dir in 01-stash 02-merge 03-restore 04-reflog; do
cd "$dir"
./setup.sh
./demo.sh
cd ..
done# Prepare all examples
for dir in */; do
cd "$dir"
if [ -f "setup.sh" ]; then
./setup.sh
fi
cd ..
doneNEW: See oral.md for the complete 1-hour presentation guide organized by themes.
Essential Git skills for daily development:
- 01-stash - Save work temporarily (3 min)
- 02-merge - Resolve conflicts (4 min)
- 03-restore - Modern file operations (4 min)
- 04-reflog - Git's safety net (4 min)
Professional Git workflows for clean commit history:
- 05-rebase-interactive - Clean history (4 min)
- 06-fixup - Smart fixup workflow (4 min)
- 07-reset - Understand reset modes (4 min)
- 08-revert - Safe undo (3 min)
Find and understand issues:
- 09-bisect - Find bugs fast (4 min)
- 10-log - Search history (4 min)
- 11-diff - Master diff viewing (4 min)
Power user features:
- 12-worktree - Parallel development (4 min)
- 13-cherry-pick - Selective commits (3 min)
- 14-submodules - Version dependencies (quick mention)
- 15-subtree - Simpler submodules (quick mention)
- 16-filter-branch - History rewriting (quick mention)
All 18 examples in the new thematic order for comprehensive coverage.
Hands-on learning:
- Students follow along with simple examples
- Practice each Git feature individually
- Build confidence before tackling complex projects
Each example directory contains:
example-name/
├── README.md # Complete documentation
├── package.json # Node.js configuration (minimal dependencies)
├── {app-name}.js # Simple CLI application
├── {app-name}.test.js # Tests (for automated bisect, etc.)
├── setup.sh # Creates Git scenario
├── demo.sh # Interactive demonstration
└── reset.sh # Cleanup script
Each example uses a different simple Node.js CLI application to keep things interesting:
- Number Guesser - Binary search game (demonstrates bisect)
- Shopping Cart - E-commerce calculator (demonstrates merge)
- Recipe Book - Recipe manager (demonstrates rerere)
- Todo List - Task tracker (demonstrates rebase)
- Calculator - Basic math operations (demonstrates fixup)
- Weather CLI - Weather forecasts (demonstrates cherry-pick)
- Note Taker - Note management (demonstrates reflog)
- Email Templates - Template generator (demonstrates stash)
- API Docs - Documentation generator (demonstrates worktree)
- Logger - Application logger (demonstrates filter-branch)
- Plugin System - Extensible app (demonstrates submodules)
- Shared Utils - Utility library (demonstrates subtree)
All apps are intentionally simple - the focus is on Git, not the code!
While a demo is paused (waiting for Enter), you can:
- Press Enter - Continue to next step
- Type a command - Execute it and see the result
- Explore freely - Try variations of the demo commands
Example:
# Demo pauses after showing git status
# You can type:
git log --oneline # Explore commit history
git branch -a # See all branches
# Press Enter when ready to continueThe demos encourage experimentation! The pause system allows:
- Testing variations of commands
- Exploring repository state at any point
- Answering audience questions live
All demos use common utilities from ../shared/demo-utils.sh:
- Typewriter effect - Character-by-character command display
- Colored output - Success, info, warning, error messages
- Git helpers - Pretty logs, status, branch displays
- Interactive pauses - Audience-friendly flow control
See ../shared/README.md for full documentation.
- Practice first - Run each demo 2-3 times to internalize the flow
- Explain the "why" - Git commands are powerful when context is clear
- Pause for questions - The pause system makes this natural
- Show mistakes - Demonstrate recovery techniques (reflog, etc.)
- Compare before/after - Show problem, then solution
- Use --no-pause for setup - Quick validation before presenting
# Check if setup was run
./setup.sh
# Check file permissions
chmod +x setup.sh demo.sh reset.sh# Verify Git installation
git --version
# Verify Node.js installation
node --versionEdit ../shared/demo-utils.sh:
DELAY_BETWEEN_CHARS=0.05 # Faster
DELAY_BETWEEN_CHARS=0.15 # Slower# Reset and start fresh
./reset.sh
./setup.sh
./demo.shThis repository also contains a full Angular application demonstration in ../git-conf/:
- Scope: Comprehensive 45-60 minute demo
- Complexity: Real-world production application
- Features: Multiple Git features integrated together
- Audience: Developers familiar with Angular
The examples/ directory (this one) complements git-conf/ by:
- Breaking features into focused demonstrations
- Using simple, easy-to-understand apps
- Allowing modular presentation (pick and choose)
- Providing hands-on workshop material
Improvements welcome! Each example should:
- ✅ Take 3-5 minutes to demonstrate
- ✅ Use a simple, understandable Node.js app
- ✅ Focus on ONE Git feature clearly
- ✅ Include comprehensive README.md
- ✅ Work independently of other examples
- ✅ Use shared utilities for consistency
Created for NG Baguette Conf 2026 - Angular Conference in Paris
- Date: May 29, 2026
- Focus: Git workflows for modern development
- Approach: Learning through simple, practical examples
MIT
Happy Git Learning! 🚀