Skip to content
AltZTraining for Every AltZ Venture
What Is Version Control
beginner9 min

History as a Chain

Every save records who, when, why and what came before it. Linked together, those saves become a history you can read and return to.

The last lesson ended on a gap: a diff shows what changed, but never why. This lesson closes it, and shows how a series of saves becomes a history.

What one save records

Each time you save in a version control system, it records more than the files:

PartExampleAnswers
The filesproposal.md, budget.csv, slides.mdWhat it looked like
WhoPriya RamanWho changed it
WhenMonday 15:40When
A messageReport every two weeks; the client asked for earlier updatesWhy
The parentThe save that came right before this oneWhat came before
An ID3f9a2c1Which one

The message is the part every tool in lesson 2 was missing. The system asks for it every time you save, so the reason travels with the change instead of living in someone's head.

The ID is a short code that names one save and nothing else. Git makes them long strings of letters and numbers and usually shows the first seven. You never need to understand how they are made, only that you can point at any save by its ID and always get exactly that one.

Saves link into a chain

The parent is what turns separate saves into a history. Each save points back to the one before it, so from any save you can walk back, one step at a time, to the very first.

a71e0b48b41d073f9a2c1c52e9f8Start theproposalAdd thebudgetReport everytwo weeksCut the priceby 10%each arrow points to the save that came before

Read that way, the history of the proposal is a short story: it was started, the budget was added, the reporting schedule changed because the client asked, and the price came down. Every step has a reason, a person and a time.

A message says why

Most tools will show you a history like this one, newest first:

c52e9f8  Priya   Tue 09:15  Cut the price by 10% to match the client's Q1 budget
3f9a2c1  Priya   Mon 15:40  Report every two weeks; the client asked for earlier updates
8b41d07  Sam     Mon 11:20  Add the budget
a71e0b4  Sam     Mon 10:02  Start the proposal

And here is the same project with the messages people write when they're in a hurry:

c52e9f8  Priya   Tue 09:15  changes
3f9a2c1  Priya   Mon 15:40  fix
8b41d07  Sam     Mon 11:20  update
a71e0b4  Sam     Mon 10:02  first

Both histories hold exactly the same files. Only the first one can answer "why is the price lower than last week?" without a meeting.

A good message does two things:

  1. Says what changed, in plain words. "Cut the price by 10%", not "changes".
  2. Says why, when the why isn't obvious. "To match the client's Q1 budget" is the part nobody can reconstruct later.

Keep the first line short enough to read in a list. If there is more to say, version control systems let you add more lines below it.

Going back keeps the history

Because every save is a whole snapshot, going back to an earlier version is always possible: you ask for the snapshot by its ID and get every file exactly as it was.

There are two ways to do it, and the difference matters:

  • Look at, or restore from, an old save. You open 8b41d07 and get the proposal as it was on Monday morning. Nothing in the history changes.
  • Undo a change with a new save. If c52e9f8, the price cut, turns out to be wrong, the safe way to undo it is a new save that reverses it, with a message saying so. The history then shows both: the price was cut, and the cut was taken back, and why.

The second way is how teams undo mistakes without losing track of what happened. Nothing is erased, so nothing has to be explained from memory.

Try it

Rewrite these three messages so they say what changed and, where it matters, why. Invent a plausible reason if you need one.

1. update
2. fixed it
3. changes per meeting
Example answers
  1. "Update the team list on the About page" says what. If the reason matters: "Update the team list on the About page; Jordan joined in March".
  2. "Correct the refund window from 14 to 30 days to match the policy" names the fix and points at the source of truth.
  3. "Move the launch to June 3, as agreed in the Monday review" keeps the decision and where it was made.

To practice on your own work, paste a before and after into Claude, Gemini, or ChatGPT with this prompt:

Here are two versions of a document. Write a one-line message for this change,
the way a version control system would save it: say what changed in plain
words, under 72 characters. If the reason for the change isn't clear from the
text, ask me for it before you write the message.

Before:
[paste the older version]

After:
[paste the newer version]

Next

So far the history has been one straight line. The next lesson adds the idea that makes version control safe to experiment with: a side line where you can try something without touching the version that works.