Skip to main content

Chapter 10: Version Control & Safe Experimentation

You've been working on a document for three hours. You try something experimental. It breaks everything. You frantically press Ctrl+Z twenty times hoping to get back to the working version. Sometimes it works. Sometimes you lose an hour of progress.

The problem isn't experimentation. It's experimenting without a safety net.

This chapter teaches you to use Git and GitHub — not by memorizing commands, but by understanding how version control gives you the confidence to experiment freely. Every change is tracked. Every experiment can be rolled back. Your AI Employee will use these same patterns to work autonomously without risking your data.

Principles Applied

PrincipleHow It Applies
Small, Reversible DecompositionCommit small changes you can undo; branch for experiments
Verification as Core StepCheck status before and after every operation
Constraints and SafetyBranches isolate experiments; never push untested code
ObservabilityGit log shows exactly what changed, when, and why
Bash is the KeyGit operations happen in the terminal

Interface Focus

Primary: Code (Git is a command-line tool) Secondary: Cowork (for understanding concepts and planning branching strategies)

What You'll Learn

By the end of this chapter, you'll be able to:

  • Create repositories and track changes with meaningful commit messages
  • View differences and safely undo changes at multiple levels
  • Use branches to test ideas without risking working code
  • Push to GitHub for cloud backup and portfolio building
  • Use pull requests for code review (even reviewing your own AI-generated code)
  • Apply reusable Git patterns for common development scenarios

Lessons

LessonTitleFocus
L01Your First Git Repositoryinit, add, commit — the basic snapshot cycle
L02Viewing Changes & Safe Undodiff, log, restore — understanding what changed
L03Testing AI Safely with Branchesbranch, checkout, merge — isolated experiments
L04Cloud Backup & Portfolioremote, push, pull — GitHub as your safety net
L05Code Review & Pull RequestsPR workflow for reviewing AI-generated changes
L06Reusable Git PatternsCommon workflows you'll use repeatedly
QuizChapter QuizTest your understanding

Connection to AI Employee (Chapter 10)

The version control patterns you build here provide the safety infrastructure for your AI Employee. In Chapter 10, Git enables:

  • Tracking all changes your AI Employee makes to your vault
  • Rolling back automated actions that produce unexpected results
  • Branching strategies for testing new employee behaviors
  • Audit trails showing exactly what your employee did and when

Version control is what makes autonomous AI operation safe.