SWE.for vibe coders
Lesson 1 of 48 min

What version control actually is

The mental model that makes git make sense — before you touch a single command.


You’ve probably seen git scroll past in your terminal, or watched your AI assistant run commands you didn’t fully follow. Let’s fix that — starting with the idea, not the syntax.

The problem git solves

Imagine writing an essay with no undo button, no version history, and no way to see what changed between yesterday and today. If you broke something, your only hope would be remembering exactly what you typed. That’s what coding without version control feels like.

You’ve maybe felt this already: you asked the AI to “refactor this,” it changed twelve files, something broke, and now you can’t get back to the version that worked. That sinking feeling is the exact problem git exists to eliminate.

Snapshots, not files

Here’s the key shift in thinking. Git doesn’t just save files — it saves snapshots of your entire project at moments you choose. Each snapshot is called a commit.

Think of it like a video game:

The magic is that these save points are cheap, permanent, and labeled. Six months from now you can look back and see exactly what your project looked like, and what changed, at every step.

Where does all this live?

When a project uses git, there’s a hidden .git folder in it. That folder is the “time machine” — it quietly stores every snapshot you’ve ever made. You almost never touch it directly; you just run git commands and it does the bookkeeping.

terminal
$git status
On branch main
nothing to commit, working tree clean

git status is the command you’ll run most. It answers “what’s going on right now?” — what’s changed, what’s saved, what isn’t. When in doubt, run git status. It’s impossible to break anything with it.

Check yourself

In git terms, what is a 'commit'?

Why this matters more when you vibe code

When an AI is writing large chunks of your code, you are the one who has to stay oriented. Commits are how you do that. Commit when things work, and every AI experiment afterward becomes safe: if the next suggestion is a mess, you throw it away and you’re instantly back to solid ground.

That’s the whole game. In the next lesson you’ll make your first commit and feel it click.

Check yourself

You ask your AI tool to 'improve' a file that currently works. What's the smart move first?