1. Introduction to version control

What is version control?

It's March 2006. 2am on the clock. I'm a 3rd grade computer science student, presenting my first ever freelance project to the 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 of 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 contains the recent code, so I can't figure out what changes started causing the issue.

What's that on your desk behind the speaker?

Oh, that's the same floppy disk 💾 to which I put the backup 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 changes that you make to a set of files over time. When using version control, you can recall any past version of your files later. 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
© 2024-2025 GitByBit.All rights reserved.

Hi! I'm Alex, creator of GitByBit.

This page is a part of the interactive course about Git version control.

It's a one-of-a-kind course that is integrated into the VS Code code editor. Learning directly in VS Code lets you operate Git exactly as you would in real life, doing real jobs, writing real code.

In addition, the course has access to your actual terminal, so it can point out mistakes, suggest workarounds, etc.

The course is FREE, there are no Ads or other bullshit. There are optional premium add-ons you can purchase, mainly to support my work (regrettably, I have to eat every day), but that's totally up to you.

Learn Git in VS Code