Skip to main content

Command Palette

Search for a command to run...

Why Version Control Exists

The Pendrive Problem

Updated
•4 min read•View as Markdown

Why Version Control Exists

If someone is new to coding, he is very likely to utilize Git in their every day life without even thinking of it how that works, how it runs in the background. One only knows that he is typing commands, your code is saved, and your coworkers see it. It is that simple.

So why does Git like distributed version control systems exist? Why can't we just email our code to each other instead of using Git?

To understand the value of Version Control, we have to look at the “before git era” of software development. It was a time when collaborating on a project wasn't just hard, it was dangerous.

Before Version Control

Before version control, saving your work was a manual, messy process.

Imagine you are writing a report. You finish a draft, but you want to try a new idea without ruining the original. What do you do? You "Save As" and rename the file. Isn’t it ?

Developers used to do this with entire software projects. A project folder often looked like : MyProject_v1, MyProject_Final, MyProject_final_fixed_bug…..etc

The Problem: This creates total confusion. Which folder has the working code? If you make a mistake, there is no "undo" button that goes back three days. You are stuck digging through old folders, hoping you saved the right version.


The Pendrive Analogy in Software Development

Now, after these all struggles. This brought about the era of "Sneakernet” which means physically walking data from one computer to another using a pendrive (USB stick).

Imagine Ram and Sham are building a website together. To make things work fine :

  • There is only one "Master Copy" of the code, and it lives on a white pendrive.

  • The Process is like, If Ram wants to edit the code, he takes the pendrive. While he has it, Sham cannot do anything. He has to wait until Ram is done, saves her work to the drive, and physically hands it to him.

Workflow: Pendrive vs. Version Control

Here is the difference between the old "serial" way (using pendrive and one can only work at a time in a project ) and the modern "parallel" way (more than one can work at a time, collaboration is possible).

The Reality: In the old way, the pendrive is a bottleneck. In the modern way, everyone works at the same time, and the system merges their work automatically.


The Disaster of Data Loss

The biggest problem with the pendrive/email method wasn't speed—it was losing work. Without a system to track history, "saving" meant overwriting the previous version forever.

The Scenario:

  • On Monday, Ram fixes the fonts on the website and saves it to the pendrive.

  • On Tuesday: Sham takes the pendrive. But Sham unknowingly has an old copy of the website on his laptop from last week.

  • The crash happens when, Sham edits his old copy and saves it to the pendrive. He just deleted all of Ram's font fixes because his "new" save overwrote his work.


Problems Faced Before Version Control

To summarize, here are the three major issues that made Version Control mandatory:

A. Overwriting Code

As shown above, if two people edit the same file, the last person to save remains and the first person's work is erased. This cause data loss issue.

B. No History

Coding is trial and error. Sometimes you write code for three days, realize it's a bad idea, and want to go back to how it was on Monday. So there is no provision for going back as there is no history of previous data.

  • Without VCS: You have to manually delete lines and hope you remember what the old code looked like.

  • With VCS: You type one command (like git checkout), and your code instantly reverts to Monday's state.

C. No Accountability

Without version control, there is no log of who changed what, like there is no collaboration history available with us. If the login page breaks, you look at the code and there is some problem with it, you can’t question from where it came, and who did it.

There were no answers. Modern systems track every single line of code back to the author and the timestamp, providing a clear history of the project's evolution.

Conclusion

Version control systems like Git didn't appear just because programmers love complex tools. They were invented to solve a specific, painful problem: We were terrible at sharing files, and having track of it.

They moved us from a world of frantic emails, lost data, and "final_final_v3" folders to a world where every change is safe, tracked, and reversible at a given time.