1. Intro to version control

What is version control?

It's March 2006. It's 2 a.m., and I'm a third year computer science student, presenting my first ever freelance project to an important client tomorrow morning.

The only problem is...
The damn app is broken!

I've been coding for the last 14 hours, so I don't really remember what I changed that's causing this.

All I know is that the data layer of the app worked yesterday (or was it the day before?). Now, instead of stock prices, I'm getting a bunch of errors on my screen.

Did you try to fix it?

I tried to undo my way out of this mess, but... it's 2006, so my IDE can only revert about 5 minutes' worth of my sloppy midnight coding.

Besides, I feel uneasy pressing undo repeatedly because if I accidentally press a key now, it could overwrite all the recent code I've written.

Unless...

...unless my Windows 98 PC doesn't crash randomly and corrupt all my open files in the first place.

Do you have any backups?

I'm desperate. My only hope is the backup I made yesterday... or was it last week? Was it on a USB stick? Or maybe on a CD?

None of it has the recent code, so I can't figure out which changes started the issue.

What's that on your desk behind the speaker?

Oh, that's the same floppy disk 💾 that I put the backup on yesterday! That's a miracle!

Hold on, I have to extract the archive from the floppy disk first.

Fingers crossed 🤞
C:\> unrar x B:\backup.zip C:\ Extracting... 10% Extracting... 20% Extracting... 30% Extracting... 40% Extraction error. THE ARCHIVE IS CORRUPT.
Oopsie! 😅

I can't get my files from the backup! Could the magnet inside the speaker corrupt the floppy disk?

I guess this is it. I'm royally screwed.

8 hours later...

It's amusing to think about it now, but back then, I was devastated. Eventually, I found the root cause of the issue in my code and fixed it.

Unfortunately, that came too late. I missed the deadline and lost the client. But I learned my lesson the hard way.

Which is?

I have to be serious about
tracking changes in my code.

Version control system is a piece of software that records the changes you make to a set of files over time. When using version control, you can recall any past version of your files at any time. It allows you to revert any or all files in your project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more.

Today, you can see version control seamlessly integrated into many apps. For example, when you edit a document on Google Docs, you can see a history of changes and revert your document to an earlier version. It's the same with files on Dropbox and many others. Versioning in these apps happens automatically, and you don't have to think about it.

But there are also standalone version control systems, like Git, Mercurial, or Subversion, where you have more explicit and granular control over the versioning process.

These systems are especially useful when you're versioning complex stuff, such as a piece of software, a website, or a dataset. These things are made up of many subcomponents that have to coexist in a specific way. Thus, the subcomponents often rely on specific versions of other subcomponents. This is where version control systems shine. More on that later.

Next step
Wanna try the Story mode?
Take the course as it was meant to be taken: bite-sized progression, focused linear order, gradually unlock Gitopedia entries. Continue with real Git in VS Code/Cursor at any time.
Story mode
FREE
but requires sign-in
© 2024-2026 GitByBit.All rights reserved.