Skip to main content

Command Palette

Search for a command to run...

Why Version Control Exists: The Pendrive Problem

Updated
2 min read
Why Version Control Exists: The Pendrive Problem
B

BSc CSIT Graduate

Why version control exists?

let’s suppose you have a song lyrics file. Now you want to change one verse. You keep changing a lot of times. But after some time, you realise that the older one was better. So what will you do? nothing but regret. Cause you don’t have backup and history of the change.

Now one of your friends says, “ let’s do this song together.” And ask you for lyrics file to write his lyrics on. How would you give that to him ?I believe, you will either send it via email / whatsApp or you copy file in a pendrive and give him pendrive. Imagine,

  • One good line got triggered on your mind and you want to add that right now on the file. You can not do it because file is with him.

  • He does not write his lyrics but modified yours too.

  • He records the song himself that it’s his own song. You will lose the ownership**.**

This is problematic, right?

So, this is where version control comes into the picture. Version control is a system that

  • keeps track of all the changes in your files(like: when changes are made, who made the changes)

  • allows Multiple people collaborate independently.

  • allows you to rollback to the previous version if needed

The Pendrive Analogy in Software Development

Before version control came into the picture, developers used to write code back then too. They used to use pendrive. Pendrive used to be shared among all the developer in the team. So typical workflow used to be like this:

  • Developer A writes code

  • Copies it to a pendrive

  • Gives it to developer B

  • B edits the same file

  • Copies it back to the pendrive

  • gives it to developer

It’s look simple but if B can overwirte the codes and there will be no history for that. They don’t wanna take risk they used to make copies. B will make a new version instead updating it so that they can track changes later. That led to name project like final, final, final_real, final_actual_real. This can cause a lot of confusions to get which is the final.

To solve all these kind of issues, version control is used.