game_FINAL_v3.js
game_FINAL_v3.js
Kai and Remy knew the AI could break things, so they kept backups the simple way: copying the file before each big change.
Now the Hyper Shards folder holds game.js, game_v2.js, game_FINAL.js, game_FINAL_v3.js, game_FINAL_v3_REAL.js and game_old_WORKS.js.
Which one is the newest? Which one actually works? Nobody is sure.
Why copies fail
- Names can't be trusted"FINAL" was final for about a day. A name is whatever someone typed at the time.
- Copies drift apartA fix made in one copy is missing from all the others.
- Two laptops, two gamesKai changes one copy, Remy changes another. Combining them by hand takes hours.
- No notesNothing says what changed between two copies, or why.
Find the latest
1Name Date modified2game.js 12 March3game_v2.js 19 March4game_FINAL.js 2 April5game_FINAL_v3.js 28 March6game_old_WORKS.js 5 April
Kai needs the copy that was saved most recently. Which file is it?
- game_FINAL.js
- game_FINAL_v3.js
- game_old_WORKS.js
Show the answer
game_old_WORKS.js
The dates show game_old_WORKS.js was saved last, even though its name says old. Names mislead, and even dates only tell you when a file changed, not what changed or whether it works.
The AI made a big change
Last month, Remy asked the AI for a new boss fight. It changed about 40 lines spread across game.js. Remy played it, and the game crashed at wave 3.
What exactly had changed? Remy had already closed the editor, and in most editors the undo history is gone once the editor app is closed. No copy had been made that morning. Getting the working game back meant hunting for every changed line from memory.
Quick check
The editor's undo button is a good enough replacement for proper save points.
- True
- False
Show the answer
False
Undo only remembers recent changes while the editor is open, and it has no notes. It also can't help a teammate working on another laptop.
Save points, like in a game
In a game, you save before the boss fight. If it goes badly, you load the save and try again.
Code has save points too. A commit is a snapshot of the whole project at one moment. The tool that makes commits is Git, created in 2005 by Linus Torvalds to manage the code of Linux. Today most software teams in the world use it.
What a commit records
A commit stores much more than a copy of the files. It also records:
- A messageA short note saying what changed, like "Add boss fight to wave 3".
- WhoWhich teammate made the change.
- WhenThe exact date and time.
- Exactly what changedEvery line added or removed, in every file. This list of changes is called a diff.
Read the history
1a41f9c0 Add boss fight to wave 3 Remy Fri29c2e1b7 Fix shield timer Kai Thu371b0d3a Add combo multiplier Remy Wed43d88f42 Add pause menu Kai Tue
Each row is a commit: its ID, message, author and day. Since Friday, the game crashes at wave 3. Which commit should we go back to?
- a41f9c0 Add boss fight to wave 3
- 9c2e1b7 Fix shield timer
- 3d88f42 Add pause menu
Show the answer
9c2e1b7 Fix shield timer
9c2e1b7 is the last save point before the crashes started, so it keeps Thursday's shield fix and Wednesday's combos. Going back to 3d88f42 would throw away good work for no reason.
Quick check
What does a commit give you that a copy called game_FINAL.js doesn't?
- A message, an author, a time and the exact lines that changed
- A smaller file that loads faster
- Protection from every possible bug
Show the answer
A message, an author, a time and the exact lines that changed
A copied file is just a copy. A commit is a labelled snapshot in a history you can read, compare and go back to.
GitHub keeps it safe
Git keeps the history on your computer. GitHub is a website that stores a copy of it online, in a repository (repo for short): the project's files plus their whole history.
If a laptop breaks, the code is safe. And Kai, Remy and you share one history instead of three folders full of copies.
True story: Toy Story 2 nearly vanished
Around 1998, Pixar was making the film Toy Story 2. One day, Oren Jacob, who worked on the film's technology, watched the folder of Woody's files shrink on every refresh. A stray command was deleting the film. About 90% of it was gone.
Then the backup tapes turned out to be broken. But Galyn Susman, the film's supervising technical director, had been working from home after having a baby, and her computer there held a copy, about two weeks old. They wrapped it in blankets, drove it to Pixar and rebuilt the missing files from it.
A copy in another place saved the film. For our code, that place is GitHub.
Source: The Next Web: how Toy Story 2 was deleted twice (interview with Oren Jacob, 2012), thenextweb.com
Bolt says: We set up Git and GitHub in Stage 2. Next: the last disaster, saves that vanish.
Fact-checked 11 October 2026
- Pro Git: A short history of Git git-scm.com
- Stack Overflow Developer Survey 2022: version control survey.stackoverflow.co
- Pro Git: Viewing the commit history git-scm.com
- GitHub Docs: About repositories docs.github.com
- The Next Web: how Toy Story 2 was deleted twice (interview with Oren Jacob, 2012) thenextweb.com