- Ask user if they want to clone workshop to Documents/git-workshop - Automatically clone repository to Documents folder for convenience - Open VSCode in the workshop directory after cloning - Handle existing repositories (update if already cloned) - Provide quick start commands for VSCode terminal - Fallback to manual instructions if user declines or cloning fails - Complete end-to-end setup experience
Git Workshop
A comprehensive, hands-on Git workshop with 15 progressive modules covering everything from basic commits to advanced debugging techniques and real-world collaboration. Each module presents a real-world scenario that you must solve using Git commands, with automated verification to confirm your solution.
Perfect for developers who want to move beyond basic Git usage and master professional workflows including rebasing, conflict resolution, collaboration, and advanced Git techniques.
Workshop Structure
The workshop is organized into two tracks:
01 Essentials - Core Git Skills (8 modules)
Master fundamental Git concepts and collaborative workflows:
- Module 01: Git Basics - Initialize repositories, stage changes, make commits
- Module 02: Viewing History - Use git log and git diff to explore project history
- Module 03: Branching and Merging - Create branches, merge them, and resolve conflicts (checkpoint-based)
- Module 04: Cherry-Pick - Apply specific commits from one branch to another
- Module 05: Git Revert - Safe undoing - preserve history while reversing changes (includes merge commit reversion)
- Module 06: Git Reset - Dangerous history rewriting - local cleanup only (NEVER on pushed commits!)
- Module 07: Stash - Temporarily save work without committing
- Module 08: Multiplayer Git - The Great Print Project - Real cloud-based collaboration with teammates
02 Advanced - Professional Techniques (6 modules)
Advanced Git workflows for power users:
- Module 01: Rebasing - Rebase branches to create linear history
- Module 02: Interactive Rebase - Clean up commit history before submitting pull requests
- Module 03: Worktrees - Work on multiple branches simultaneously
- Module 04: Bisect - Use binary search to find bug-introducing commits
- Module 05: Blame - Code archaeology - investigate who changed what and when
- Module 06: Merge Strategies - Master fast-forward vs three-way merges and when to use each
How to Use This Workshop
For Local Modules (01-08 in Essentials, all Advanced modules)
- Navigate to a module directory (e.g.,
01-essentials/01-basics) - Read the
README.mdto understand the challenge - Run
./setup.ps1to create the challenge environment - Complete the challenge using git commands
- Run
./verify.ps1to check if you've solved it correctly - Move to the next module
Quick Reference: See GIT-CHEATSHEET.md for a comprehensive list of all Git commands covered in this workshop. Don't worry about memorizing everything - use this as a reference when you need to look up command syntax!
For Module 08: Multiplayer Git
This module is different! It uses a real Git server for authentic collaboration:
- Navigate to
01-essentials/08-multiplayer - Read the
README.mdfor complete instructions - No setup script - you'll clone from https://git.frod.dk/multiplayer
- Work with a partner on shared branches
- Experience real merge conflicts and pull requests
- No verify script - success is visual (your code appears in the final output)
Facilitators: See 01-essentials/08-multiplayer/FACILITATOR-SETUP.md for server setup and workshop guidance.
Running PowerShell Scripts
Most modules include setup, verification, and reset scripts.
If you encounter an "execution policy" error when running scripts, open PowerShell as Administrator and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then run scripts using:
.\setup.ps1
.\verify.ps1
.\reset.ps1
Requirements
Prerequisites
Install these tools before starting:
PowerShell 7+
winget install Microsoft.PowerShell
Git 2.23+
winget install Git.Git
Visual Studio Code
winget install Microsoft.VisualStudioCode
Quick Start
Option 1: Oneshot Installation (Recommended) Install everything and clone the repository in one command:
irm https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | iex
Option 2: Manual Setup
- Install the prerequisites above
- Clone this repository:
git clone https://git.frod.dk/floppydiscen/git-workshop.git - Configure Git:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
Quick Check:
You need the following software installed:
-
Git 2.23+ - Version control system
git --version -
PowerShell 7+
pwsh --version -
Python 3.6+ (for Module 08 only)
python --version
First-Time Git Configuration:
Before making your first commit, configure Git with your identity:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Verify your configuration:
git config --global user.name
git config --global user.email
Basic Command Line Knowledge
You should know how to:
- Navigate directories (
cd,lsordir) - See your current location (
pwd) - Read text files (
catortype)
Don't worry if you're not an expert - we'll guide you through each step!
Optional: Install Glow for Pretty Markdown
This workshop includes many markdown files with instructions. You can install glow to render them beautifully in your terminal:
.\install-glow.ps1
After installation, read markdown files with:
.\bin\glow.exe README.md
Pro tip: Use glow -p for pager mode on longer files!
Without glow, you can still read markdown files with any text editor or cat README.md.
Common Git Terms
New to Git? Here are the key terms you'll encounter:
- Repository (or "repo"): A project folder tracked by Git, containing your files and their complete history
- Commit: A snapshot of your project at a specific point in time (like a save point in a video game)
- Staging Area (or "Index"): A preparation area where you select which changes to include in your next commit
- Working Directory: The actual files you see and edit on your computer
- Branch: An independent line of development (like a parallel universe for your code)
- HEAD: A pointer showing which commit you're currently working from
- main/master: The primary branch in a repository (main is the modern convention)
- Merge: Combining changes from different branches
- Remote: A version of your repository hosted elsewhere (like GitHub, GitLab, or Gitea)
- Pull Request (PR): A request to merge your changes into another branch (used for code review)
- Conflict: When Git can't automatically merge changes because both versions modified the same lines
Don't worry if these don't make sense yet - you'll learn them hands-on as you progress!
Getting Started
First time? Make sure you have Git and PowerShell installed - see INSTALLATION.md for Windows 11 setup instructions.
Once installed, start with Essentials Module 01:
cd 01-essentials\01-basics
.\setup.ps1
Follow the instructions in each module's README.md file.
What Makes This Workshop Different
- Hands-On Practice: Each module creates a real Git scenario you must solve
- Automated Verification: Scripts check your solution instantly (modules 01-08)
- Progressive Difficulty: Builds from basics to advanced Git techniques
- Reset Anytime: Each local module includes a reset script for a fresh start
- Self-Paced: Learn at your own speed with detailed README guides
- Real Collaboration: Module 08 uses an actual Git server for authentic teamwork
- Comprehensive Coverage: From
git initto advanced rebasing and bisecting
Learning Path
The modules are designed to build on each other:
Recommended Progression
Phase 1: Core Fundamentals (Essentials 01-02)
- Git Basics, History
- Goal: Understand commits and history
Phase 2: Collaboration Basics (Essentials 03)
- Branching and Merging (checkpoint-based: branching, merging, conflicts)
- Goal: Work with multiple branches and resolve conflicts
Phase 3: Workflow Tools (Essentials 04-06)
- Cherry-Pick, Reset vs Revert, Stash
- Goal: Manage your work effectively
Phase 4: Real Collaboration (Essentials 07)
- Multiplayer Git - The Great Print Project
- Goal: Apply all skills with real teammates on a cloud server
- Note: This is a capstone module - bring everything together!
Phase 5: Advanced Techniques (Advanced 01-06)
- Rebasing, Interactive Rebase, Worktrees, Bisect, Blame, Merge Strategies
- Goal: Master professional Git workflows
- When: After completing Essentials and feeling confident
Alternative Paths
Fast Track (1 day workshop):
- Essentials 01-03 + Essentials 07 (Multiplayer)
Solo Learner:
- Complete Essentials 01-06, skip 07 (requires partners and server)
- Or complete all Advanced modules for deep mastery
Team Workshop:
- Essentials 01-03 then jump to 07 (Multiplayer) for collaborative practice
Tips for Success
- Don't skip modules - each builds on previous concepts
- Read the README.md thoroughly before starting each challenge
- Keep GIT-CHEATSHEET.md open as a quick reference
- Experiment freely - you can always run
./reset.ps1to start over - Use
git log --oneline --graph --allfrequently to visualize repository state - If stuck, check the Key Concepts section in the module's README
- Consider installing glow for better markdown reading experience
- For Module 07, work with a partner - collaboration is the point!
Skills You'll Master
By completing this workshop, you'll be able to:
From Essentials Track:
- ✅ Create and manage Git repositories with confidence
- ✅ Navigate project history and understand what changed when
- ✅ Use branches effectively for parallel development
- ✅ Merge branches and resolve conflicts like a pro
- ✅ Apply specific commits with cherry-pick
- ✅ Choose correctly between reset and revert
- ✅ Use stash to manage work-in-progress without commits
- ✅ Collaborate with teammates on shared repositories
- ✅ Resolve real merge conflicts in a team environment
- ✅ Create and review pull requests
- ✅ Use Git on a real cloud server (Gitea)
From Advanced Track:
- ✅ Rebase to maintain clean, linear history
- ✅ Clean up messy commits before submitting pull requests
- ✅ Work on multiple branches simultaneously with worktrees
- ✅ Debug efficiently by finding bug-introducing commits with bisect
- ✅ Investigate code history with git blame
- ✅ Master different merge strategies and when to use each
These are professional-level Git skills used daily by developers at top tech companies.
For Workshop Facilitators
This repository can be used for self-paced learning or as a facilitated workshop.
Self-Paced Distribution
Before distributing this workshop to attendees for self-study:
- Delete the root
.gitdirectory: This prevents confusion and ensures attendees practice git from scratchRemove-Item -Path .git -Recurse -Force - Each module's
challenge/directory will become its own independent git repository when attendees runsetup.ps1 - This isolation ensures each module provides a clean learning environment
Note: Module 08 (Multiplayer) requires you to set up a Git server - see facilitator guide below.
Facilitated Workshop
For running this as a full-day instructor-led workshop:
- See WORKSHOP-AGENDA.md - Complete agenda with timing, activities, and facilitation tips
- See PRESENTATION-OUTLINE.md - Slide deck outline for presentations
- Workshop covers: Essentials 01-05 + Module 08 (Multiplayer collaboration exercise)
- Duration: 6-7 hours including breaks
- Format: Mix of presentation, live demos, and hands-on challenges
Facilitator preparation:
- Review the workshop agenda thoroughly
- Set up Git server for Module 08 (see below)
- Ensure all participants have prerequisites installed (Git, PowerShell, Python)
- Prepare slides using the presentation outline
- Test all modules on a clean machine
- Create student accounts on your Git server
The workshop format combines instructor-led sessions with self-paced hands-on modules for an engaging learning experience.
Setting Up Module 08: Multiplayer Git
Module 08 requires a Git server for authentic collaboration. You have two options:
Option 1: Self-Hosted Gitea Server (Recommended)
Run your own Git server with Gitea using Docker and Cloudflare Tunnel:
Benefits:
- 💰 Completely free (no cloud costs)
- 🔒 Full control over your data
- 🌐 Accessible from anywhere via Cloudflare Tunnel
- 🚀 Quick setup with Docker Compose
- 👥 Perfect for workshops with 2-24 students
Setup:
- See GITEA-SETUP.md for complete Gitea + Docker + Cloudflare Tunnel instructions
- See
01-essentials/08-multiplayer/FACILITATOR-SETUP.mdfor detailed workshop preparation:- Creating student accounts
- Setting up The Great Print Project repository
- Pairing students
- Monitoring progress
- Troubleshooting common issues
Option 2: Azure DevOps / GitHub / GitLab
You can also use existing cloud Git platforms:
- Create organization/group for the workshop
- Set up repository with starter code (see facilitator guide)
- Create user accounts for students
- Configure permissions
Both options work - Gitea gives you more control and is free for any number of students.
Repository Structure
git-workshop/
├── README.md # This file
├── INSTALLATION.md # Windows 11 installation guide (PowerShell 7, Git, VS Code)
├── install-prerequisites.ps1 # Automated installation script (one-shot setup)
├── GIT-CHEATSHEET.md # Quick reference for all Git commands
├── WORKSHOP-AGENDA.md # Facilitator guide for running workshops
├── PRESENTATION-OUTLINE.md # Slide deck outline
├── GITEA-SETUP.md # Self-hosted Git server setup
├── install-glow.ps1 # Install glow markdown renderer
│
├── 01-essentials/ # Core Git skills (8 modules)
│ ├── 01-basics/ # Initialize, commit, status
│ ├── 02-history/ # Log, diff, show
│ ├── 03-branching-and-merging/ # Branches, merging, conflicts (checkpoint-based)
│ ├── 04-cherry-pick/ # Apply specific commits
│ ├── 05-revert/ # Safe undoing (includes merge commits)
│ ├── 06-reset/ # Dangerous local cleanup
│ ├── 07-stash/ # Save work-in-progress
│ └── 08-multiplayer/ # Real collaboration (cloud-based)
│ ├── README.md # Student guide
│ └── FACILITATOR-SETUP.md # Server setup guide
│
└── 02-advanced/ # Professional techniques (6 modules)
├── 01-rebasing/ # Linear history with rebase
├── 02-interactive-rebase/ # Clean up commits
├── 03-worktrees/ # Multiple branches simultaneously
├── 04-bisect/ # Find bugs with binary search
├── 05-blame/ # Code archaeology
└── 06-merge-strategies/ # Master merge techniques
What's Unique About This Workshop
The Great Print Project (Module 07)
Unlike any other Git tutorial, Module 08 provides real collaborative experience:
- Real Git server: Not simulated - actual cloud repository at https://git.frod.dk/multiplayer
- Real teammates: Work in pairs on shared branches
- Real conflicts: Both partners edit the same code and must resolve conflicts together
- Real pull requests: Create PRs, review code, merge to main
- Real success: When all pairs merge, run
python main.pyand see everyone's contributions!
The challenge: Each pair implements 3 Python functions (e.g., print_b(), print_c(), print_d()) in a shared repository. When complete, the program prints the alphabet A-Z and numbers 0-9.
What students learn:
- Push/pull workflow with real teammates
- Handling rejected pushes (partner pushed first!)
- Resolving actual merge conflicts (not simulated)
- Creating meaningful pull requests
- Reviewing others' code
- Staying synchronized with a team
This is how professional developers actually work - no simulation, no shortcuts.
Frequently Asked Questions
Q: Do I need to complete all modules? A: No! Essentials 01-05 covers what most developers use daily. Complete 06-09 and Advanced modules to deepen your skills.
Q: Can I do Module 08 (Multiplayer) without a partner? A: Not recommended - collaboration is the point. If solo, skip to Advanced modules or wait until you can pair with someone.
Q: How long does the workshop take? A:
- Essentials 01-05: 3-4 hours
- Full Essentials (01-09): 6-7 hours
- All modules: 12-15 hours
- Self-paced over several days works great!
Q: I'm stuck on a module. What should I do? A:
- Re-read the module README.md
- Check GIT-CHEATSHEET.md
- Run
./reset.ps1to start fresh - Use
git statusandgit log --graphto understand current state - For Module 08, ask your partner or facilitator
Q: Can I use this for a team workshop at my company? A: Absolutely! See the "For Workshop Facilitators" section above. The materials are designed for both self-study and instructor-led workshops.
Q: Do I need internet access? A: Modules 01-07 work completely offline. Module 08 requires internet to access the Git server.
Q: What if I prefer GitHub/GitLab instead of Gitea? A: The skills are identical across all Git platforms. Module 08 uses Gitea but everything you learn applies to GitHub, GitLab, Bitbucket, etc.
Contributing
Found a bug or have a suggestion? Please open an issue or submit a pull request!
License
This workshop is provided as-is for educational purposes.
Ready to master Git?
First-time setup (Windows 11): See INSTALLATION.md
Then start with Essentials Module 01 and begin your journey!
cd 01-essentials\01-basics
.\setup.ps1
Happy Learning! 🚀