Git Workshop

A comprehensive, hands-on Git workshop with 13 progressive modules covering everything from basic commits to advanced debugging techniques. 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, bisecting, worktrees, and more.

Workshop Structure

Each module is a self-contained challenge that teaches specific git concepts:

Beginner Level

  • 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 Basics - Create, switch, and manage branches

Intermediate Level

  • Module 04: Merging - Combine branches with fast-forward and three-way merges
  • Module 05: Merge Conflicts - Identify, understand, and resolve merge conflicts
  • Module 06: Rebasing - Rebase branches to create linear history
  • Module 07: Interactive Rebase - Clean up commit history with reset and recommit
  • Module 08: Cherry-Pick - Apply specific commits from one branch to another

Advanced Level

  • Module 09: Reset vs Revert - Understand when to rewrite history vs create new commits
  • Module 10: Stash - Temporarily save work without committing
  • Module 11: Working with Remotes - Clone, push, pull, and fetch from remote repositories
  • Module 12: Worktrees - Work on multiple branches simultaneously
  • Module 13: Bisect - Use binary search to find bugs in commit history

How to Use This Workshop

  1. Navigate to a module directory (e.g., module-01-basics)
  2. Read the README.md to understand the challenge
  3. Run ./setup.ps1 to create the challenge environment
  4. Complete the challenge using git commands
  5. Run ./verify.ps1 to check if you've solved it correctly
  6. Move to the next module

Requirements

  • Git installed and configured
  • PowerShell (Windows PowerShell 5.1+ or PowerShell Core 7+)
  • Basic command line knowledge

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:

# Windows
.\bin\glow.exe README.md

# macOS/Linux
./bin/glow 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.

Getting Started

Start with Module 01:

cd module-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
  • Progressive Difficulty: Builds from basics to advanced Git techniques
  • Reset Anytime: Each module includes a reset script for a fresh start
  • Self-Paced: Learn at your own speed with detailed README guides
  • No Internet Required: All modules work offline with local repositories

Learning Path

The modules are designed to build on each other:

  1. Start Here (Modules 1-3): Core Git fundamentals everyone needs
  2. Collaboration (Modules 4-5): Working with branches and resolving conflicts
  3. History Management (Modules 6-8): Rewriting and organizing commits
  4. Advanced Workflows (Modules 9-11): Professional Git techniques
  5. Power User (Modules 12-13): Advanced tools for productivity and debugging

Tips for Success

  • Don't skip modules - each builds on previous concepts
  • Read the README.md thoroughly before starting each challenge
  • Experiment freely - you can always run ./reset.ps1 to start over
  • Use git log --oneline --graph --all frequently to visualize repository state
  • If stuck, check the Key Concepts section in the module's README
  • Consider installing glow for better markdown reading experience

Skills You'll Master

By completing this workshop, you'll be able to:

  • 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
  • Rebase to maintain clean, linear history
  • Clean up messy commits before submitting pull requests
  • Cherry-pick specific commits across branches
  • Choose correctly between reset and revert
  • Use stash to manage work-in-progress without commits
  • Collaborate effectively with remote repositories
  • Work on multiple branches simultaneously with worktrees
  • Debug efficiently by finding bug-introducing commits with bisect

These are professional-level Git skills used daily by developers at top tech companies.

For Workshop Facilitators

Before distributing this workshop to attendees:

  1. Delete the root .git directory: This prevents confusion and ensures attendees practice git from scratch
    Remove-Item -Path .git -Recurse -Force
    
  2. Each module's challenge/ directory will become its own independent git repository when attendees run setup.ps1
  3. This isolation ensures each module provides a clean learning environment
Description
Git workshop
Readme 201 KiB
Languages
PowerShell 100%