What Version Control Is For
What a History Lets You Do
“Going back to an old version” is the answer most people give when asked what version control is for. It is true, and it is the smallest part.
Here is what a history actually buys you.
You can go back
You can retrieve the exact file versions recorded in an available
You can also go back to look without staying there, which is the part people do not expect. Peeking at last month’s version is a normal, low-stakes thing to do, not a rescue operation.
You can see what changed
Ask Git for the difference between any two commits and it will show you precisely which lines came and went.
This is the ability that makes reviewing someone’s work possible at all. It is also how you check your own work before saving it, which turns out to be a habit worth having. “Show me everything I am about to commit” catches a surprising number of mistakes, including debugging lines you meant to delete and a password you did not mean to type into a file.
You can find when something broke
This one is quietly the most valuable, and it is the hardest to appreciate before it has saved you.
Something works in March. In June, it does not. Nothing in front of you explains why.
With a history, you have the states you chose to record. You can compare a working version with a broken one, find the commit where the recorded behavior changed, read its message, and inspect the changed lines. If several edits went into that commit, you may still need to investigate which edit caused the problem.
Without a history, you are reasoning about a program you cannot see the past of.
You can work without fear
The other three are conveniences. This one changes how you work.
When your starting work is committed, trying something becomes cheaper. You can rewrite a section or remove something that looks unnecessary, then compare the experiment with the saved version. If it fails, you can restore the recorded files after checking which uncommitted edits you are willing to discard.
Compare that with an uncommitted project, where every large change carries a quiet cost: if this goes badly I may not be able to get back. That cost does not stop you working. It makes you work smaller and more timidly than you would otherwise, usually without noticing.
People who are comfortable with Git are noticeably braver with their work. That is not a personality difference. They have a safety net and they know exactly how it works.
A colleague says version control is "just backups, really." Which reply is most accurate?
The honest catch
None of this happens automatically.
Git does not watch your folder and record your work as you go. You decide when to make a commit, and you write the message. A project where someone commits thoughtfully once an hour has a history worth reading. A project where someone commits once a month with the message updates technically has a history and it will help you very little.
So the skill here is not only knowing the commands. It is developing a sense of when a piece of work is worth recording, and what to say about it. That sense builds by doing, and you will start building it in the next chapter, on a real