Course → Module 4: The Workspace
Session 5 of 7

Why Version Control Matters for Content

Version control tracks every change to every file in your project. Not "Save As v2." Actual change tracking where you can see exactly what changed, when it changed, and a note explaining why. Git is the standard version control system. It was built for software developers, but the principle applies to any work that evolves over time: code, prose, prompts, and production configurations.

For AI content production, Git solves three problems that no amount of careful file naming can fix.

Problem Without Git With Git
Prompt iteration tracking Multiple files: prompt-v1.md, prompt-v2.md, prompt-v3.md One file with full history of every change
Accidental deletion Gone forever (unless you have backups) Recoverable from any previous commit
Knowing what worked Memory and notes, both unreliable Exact state of every file at any point in time
Collaboration Emailing files, manual merging, confusion Parallel work with structured merging

Git is not about code. Git tracks changes to text files. Prompts are text files. Outputs are text files. Configuration is text files. Your entire AI production pipeline is text files. Git was made for this.

Three Commands You Need

Git has dozens of commands. You need three. Your AI coding assistant handles the rest.

git add stages files for the next commit. It tells Git "these are the changes I want to record." You can add specific files (git add prompts/system-prompt.md) or all changed files (git add .).

git commit records the staged changes with a message describing what changed and why. The message matters. "Updated stuff" is useless. "Revised system prompt to reduce hedging in output" is useful. Six months from now, these messages are your project diary.

git log shows the history of all commits. Each entry includes the date, the message, and a unique identifier. You can use this identifier to go back to any previous state.

gitGraph commit id: "Initial project structure" commit id: "Add system prompt v1" commit id: "Add generation script" branch prompt-revision commit id: "Revise prompt: reduce hedging" commit id: "Test new prompt, 4/5 pass" checkout main merge prompt-revision id: "Merge improved prompt" commit id: "Add batch processing script" commit id: "Update prompt for product descriptions"

The Git Workflow for Content Production

The daily workflow is simple. You make changes. You stage them. You commit them with a message. Repeat. At any point, you can look back at the history and see exactly how your prompts, scripts, and outputs evolved.

graph LR A["Edit files"] --> B["git add ."] B --> C["git commit -m 'message'"] C --> D["git log"] D --> A style A fill:#222221,stroke:#c8a882,color:#ede9e3 style B fill:#222221,stroke:#6b8f71,color:#ede9e3 style C fill:#222221,stroke:#c47a5a,color:#ede9e3 style D fill:#222221,stroke:#8a8478,color:#ede9e3

Commit frequently. A commit after every significant change is better than one massive commit at the end of the day. "Significant" means: you changed a prompt, you modified a script, you updated a configuration. Not every keystroke, but every decision point.

What to Commit, What to Ignore

Not everything belongs in Git. API keys, large binary files, and temporary outputs should be excluded. Git provides a file called .gitignore that lists patterns of files Git should ignore.

A standard .gitignore for AI content production:

.env
__pycache__/
*.pyc
outputs/raw/*
node_modules/
.DS_Store

Notice that outputs/raw/* is ignored. Raw AI generations are disposable. Reviewed and final outputs may be worth tracking. Prompts and scripts are always worth tracking. Your .env file (containing API keys) must never be committed.

VS Code's Git Integration

VS Code has a built-in Git panel (the branch icon in the sidebar). It shows changed files, lets you stage them with a click, and provides a text box for commit messages. You do not need to use the terminal for Git if you prefer the visual interface. The result is identical. Use whichever feels more natural.

Further Reading

Assignment

Initialize a Git repository in your course project folder. If you are unsure how, ask your AI coding assistant: "How do I initialize a Git repository in this folder?" Make a change to any file. Stage it with git add. Commit it with a descriptive message. Make another change. Commit again. Run git log and see your history. You now have version control.