What is version control? Explained with an office archive
Version control records every saved change to a project's files, with who, when and why, so a team can compare versions and go back to any of them. Like an office archive with a logbook of every dated copy.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- Engineering
This week's news on AI prompt leaks, Copilot review billing and Claude Ship all turn on one idea: the code repository, where version control keeps a team's work and its history.
In one sentence: Version control is a system that records every saved change to a project's files over time, with who made it, when and why, so a team can compare versions, work side by side and go back to any earlier version.
The everyday picture
Picture an office with a careful archive for each project. Nobody just overwrites the contract on their desk and hopes for the best.
Each time someone finishes a round of changes, they file a dated copy in the archive. They attach a short signed note: what changed and why. The clerk stamps it with a reference number and writes it in the logbook.
Months later, anyone can open the logbook, see who changed clause 4 and when, put two copies side by side, or pull out last spring's copy if the new one went wrong. That archive, with its logbook, is version control.
A developer saves changes as a commit, the repository keeps it with the full history, and the team can look up any earlier version and return to it if something breaks.
How it works, step by step
- The repository (the project's archive) holds all the files and folders of a project, plus each file's full history. GitHub calls it the most basic element of its service. People often shorten it to "repo".
- A commit (a dated copy filed with a signed note) saves a snapshot of the changes. Each one must carry a short message, and Git gives it a unique ID, called a SHA or hash, that identifies the changes, when they were made and who made them.
- The history (the logbook) lists every commit in order. You can compare any two versions and see who last changed a line that is causing a problem.
- A branch (a separate tray for a draft) lets someone work on a change without touching the main copy. When the work is ready, a merge combines it back into the main version, usually after review in a pull request.
- Going back (pulling an older copy out of the archive): if a change breaks something, the team can return selected files, or the whole project, to an earlier state.
Try it · Everyday ↔ real
Can you match the archive to the real thing?
Switch between the two and see how each part lines up.
- The project's archive
- A dated copy with a signed note
- The clerk's reference number
- The logbook
- A separate tray for a draft
- Combining the draft into the main copy
The office archive for one project
| Everyday | Real |
|---|---|
| The project's archive | Repository |
| A dated copy with a signed note | Commit with a message |
| The clerk's reference number | Commit ID (SHA or hash) |
| The logbook | Commit history |
| A separate tray for a draft | Branch |
| Combining the draft into the main copy | Merge |
Where the picture stops
- An office has one archive. With Git, the most popular version control system, every developer's computer holds a full copy of the repository and its whole history. The Git book says every copy is really a full backup of the data.
- Throwing away a paper copy removes it. Deleting a file in version control only adds a new entry; the earlier copies still contain it. That is why a password pasted into code must be changed, not just deleted.
- A clerk combines two edited copies by hand. Git usually combines changes on its own when they touch different lines, and asks a person only when two changes clash.
Why it matters for your business
- Lower risk. A bad change can be undone by going back to the last good version, instead of rebuilding from memory.
- Clear accountability. The history shows who changed what, when and why. That helps when something breaks, and when an AI coding agent is making changes too.
- Ownership. The repository is where your code and its history live. Keep it in an account your company owns, and invite outside developers in, rather than the other way round.
- Safer teamwork. Branches let several people, or agents, work at once without overwriting each other, and reviews happen before anything joins the main version.
Try it · Myth or fact
Version control: myth or fact?
Decide for yourself first, then tap each statement to check it.
0 of 4 checked
An example
Imagine a 15-person online shop that hires a freelancer to update its checkout. The code lives in a repository in the shop's own account. The freelancer works on a branch and commits each step with a note.
A week after launch, card payments start failing. The history shows which commit changed the payment page. The team returns the checkout to the version before it, customers can pay again within the hour, and the freelancer fixes the bug on the branch in peace.
Frequently asked questions
Is Git the same as GitHub?
No. Git is the version control system that records the history. GitHub is a service that hosts Git repositories online and adds tools for teams, such as pull requests, issues and code review.
What does "commit" mean?
A commit is one saved snapshot of changes, with a message describing them. Git stamps it with a unique ID that records what changed, when and who made the change.
What is the difference between a public and a private repository?
On GitHub, a public repository can be seen by anyone on the internet. A private one is visible only to you, the people you share it with and, for company repositories, certain members of your organisation.
Is version control a backup?
It helps: with Git, each full copy of a repository holds the whole history. It does not replace a backup plan for your databases, files and accounts, which live outside the repository.
Related explainers
- What is a pull request? Explained with an editor's sign-off
- What is code review? Explained with a second cook at the pass
- What is CI/CD? Explained with a factory assembly line
- What are backups? Explained with a spare key at a friend's house
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.