Snapshots and Diffs
A version control system saves the whole project at once, then shows you what changed between any two saves.
The first thing a version control system adds is the one every tool in the last lesson was missing: it saves the whole project at once.
A snapshot is the whole project at one moment
When you save in a version control system, it records every file in the project exactly as it is right now, together, as one unit. That unit is a snapshot. Git calls it a commit; other systems use other words for the same idea.
Every snapshot holds every file, including the ones that didn't change. That is what makes "the version from Monday afternoon" a real thing you can go back to: not one document as it was, but the proposal, the budget and the slides as they were, together.
It sounds expensive. It isn't. Git, for example, stores each unchanged file only once and points to it from every snapshot that has it, so you get the whole project in every save for close to the cost of the changes.
A diff is what changed between two snapshots
Most of the time you don't want to look at a whole snapshot. You want to know what is different between two of them. That comparison is a diff.
Here is a diff of one paragraph from the proposal, between Monday morning and Monday afternoon:
The pilot runs for eight weeks with one team.-We will report results at the end of the pilot.+We will report results every two weeks, starting in week two. Pricing is in the attached budget.
Three rules cover almost every diff you will ever read:
- A line starting with
-was removed. It was in the older snapshot and isn't in the newer one. - A line starting with
+was added. It's in the newer snapshot only. - A line starting with a space didn't change. It is shown as context, so you can see where the change sits.
A changed line shows up as a removal followed by an addition. Nothing above was "edited" as far as the diff is concerned: the old sentence went out and a new one came in. Many tools also highlight the exact words that differ inside the pair, which makes a one-word change easy to spot.
Two views of the same history
Snapshots and diffs aren't two different things being saved. The system saves snapshots, and works out a diff whenever you ask for one.
| You want to | You use |
|---|---|
| Get back to how everything was | The snapshot |
| See what an edit actually touched | The diff |
| Review someone's work before you keep | The diff |
| Hand over the version that worked | The snapshot |
When an AI assistant edits your files, the diff is where you check its work. It shows every line it removed and every line it added, including the ones you didn't ask for.
Text diffs well. Some files don't
Diffs work line by line, so they work best on plain text: notes, Markdown, prompts, CSV data, web pages, code.
Word documents, slide decks, spreadsheets in their native format, images and PDFs are stored in ways a line-by-line comparison can't read. A version control system still saves snapshots of them, so you can always get an old one back. It just can't show you what changed inside them in a readable way.
That's a good reason to keep prompts, notes and documentation in a plain text format like Markdown: every change to them shows up clearly in a diff.
Try it
Read this diff and answer two questions: what changed, and what might the reason have been? Then open the answer.
Subject: Your trial ends Friday-Hi there,+Hi {first_name}, Your free trial of Northwind ends this Friday.-Upgrade now to keep your data.+Upgrade before Friday to keep your projects and settings.+Questions? Reply and a person will answer.
Answer
Three changes. The greeting now uses the customer's name instead of "Hi there". "Upgrade now to keep your data" became a more specific line about projects and settings, with the deadline repeated. And a new last line offers a reply to a real person.
A likely reason: the email was rewritten to feel less automated and less pushy. The diff can't tell you that for sure. Only a note saved with the change can, and that is the next lesson.
You can also practice with your own writing. Paste two versions of a paragraph into Claude, Gemini, or ChatGPT with this prompt:
Here are two versions of the same text. Show me the differences as a diff,
with "-" in front of removed lines and "+" in front of added lines, and unchanged
lines as context. Then tell me in one sentence what changed.
Version 1:
[paste the older version]
Version 2:
[paste the newer version]
Next
A diff tells you what changed. It can't tell you why. The next lesson is about the note a version control system saves with every snapshot, and how a chain of those snapshots becomes a history you can read.