Which file is the final one?
Three copies of one file all say "final", and you cannot tell which is the latest? This lesson explains how to keep one file, with every state saved from it.
The scene
At 9:10 on Thursday, Munir came to the public counter, the window where people hand papers to the court, for a copy of a decision: what a judge writes at the end of a case. From a blue plastic folder he took a page printed from the court's website, "Required documents".
"This list is old," said the clerk. "The new one also wants a copy of the receipt you got when you paid the fee."
"I printed it yesterday, from your page," Munir said.
Ibrahim, the head clerk who runs the court's paperwork, stood behind him. He took the page: at the bottom was an enquiries number cancelled two months ago.
Munir put the page back in his folder. "I live at the end of the bus line," he said, and left to fetch the receipt.
Upstairs, Ibrahim opened the shared folder that all staff reach over the court's network. It held three copies of the list: "final", "final2" and "really final". He called in Najla, who edits the court's pages.
"Which one did you put online?"
"The final one, which you approved."
Ibrahim had approved "really final", with the new number. Najla had uploaded "final2", with the old one. Each thought the other meant the same file.
"They differ by one line at the bottom," Najla said. "Who reads the bottom of a page?"
"The counter clerk did. And why three?"
"Each time I edit, I'm afraid of losing the earlier version, so I save under a new name."
She put "really final" online and moved the other two into a folder she called "old".
At 11:00 Ibrahim went down to the IT office, the small room that looks after the court's computers. Hussam turned his screen towards him. "Last month I tried something on this list, then dropped it."
On screen was one file, "Required documents", with no "final" or number in its name. Under it, a few lines, each a date and a short sentence: "Add copy of receipt", "Change enquiries number".
"To keep the file as it stands, I save, and the program adds a line. Any line opens the file as it was, and I can compare two states. One file, newest on top. This is ."
"Who wrote those sentences?"
"I did, at each save. The program adds my name, the date and the time."
He pulled out the network cable, to show the states lived on his machine, not the internet, and opened the oldest state, which opened just as it had been. "The program that keeps them here is ."
Cable back in, he opened a browser: the same file and lines, on a web page. "This is , a website that keeps a copy and shows it to colleagues. Najla sees it from her desk, you from yours."
Ibrahim looked at the screen for a while. "We move all the court's pages onto this, starting next week."
At 12:30 Munir came back with his receipt. Ibrahim printed the list from the page, wrote the date on top by hand, and put it in the blue folder, over the old page.
The idea
Version control keeps one file under one name, and every state it passed through, each dated and described.
- : one current file; earlier states open as they were, for comparison.
| Kind | a program, working offline | a website |
| Keeps | the states, on your computer | a copy shared with colleagues |
If told "the file is on GitHub", ask whether someone's computer holds a copy too: what Git saved survives a website outage.
Try it yourself
- Create a free account.
- Start a new project and choose to add a first file, so it does not start empty.
- Open that file, change a sentence and save. When the page asks why, write one sentence: colleagues will read it later.
- Find the page listing past states, open the oldest, and press Browse files to see the files as they were before your change.
These steps use only the website; Git on your computer comes later. Button names may differ: look for the meaning, not the word.
Where this fits
You now know why the file stays one. The next lesson opens where those states are kept and reads one: who saved it, when, and why.