Why Version Control Exists: The Pendrive Problem

Full-stack developer and startup founder building tech solutions in Ayodhya. Vlogger with 27k+ followers sharing my journey in technology and SaaS.
Imagine you are working on a project in which you made changes in one file and saved it, then you started writing in another folder, and suddenly you thought that you have done mistake in the previous file and want to go back to how the file looked yesterday.
Without version control, you might have deleted the old version forever. Version Control is like a "Time Machine" for your code. It saves every change you make, so you can go back in time if something breaks.
The Pendrive Analogy in Software Development:
System developers share code manually with each other. This is also called the Pendrive System or Email Method.

Before the version control system, programmers used pen drives and analogue technology to share code with other programmers and allow them to work on projects as a group. In this method, he used to save the file on which he worked on a pen drive and then give it to another programmer, and that programmer used to make whatever changes he wanted to make in it and then save it. But the problem is that if the first programmer starts working on some other feature at the same time and the version of the second programmer is different, then the versions of both the different codes will be different. This is the biggest problem with the Pendrive Analogy.
To avoid this problem, we used to keep the folder names different so that it is known which folder contains the project and which editing feature is happening in which folder.
The "Folder Name" Mess
Because we were afraid of losing work, we created many folders. It looked like this:
project_v1
project_final
project_final_v2
project_REAL_FINAL_DO_NOT_DELETE
The Problem: After one week, nobody knew which folder was actually the latest one!
Problems Faced Before Version Control Systems
Before version control systems, we showed many problems. If you don't use Git, these three things happen constantly:
Overwriting Code: If you and I both edit the "Home Page" at the same time, and I copy my file to your computer, your work is deleted. It is overwritten by mine.
Losing Changes: If your computer breaks or you delete a file by mistake, it is gone forever. There is no "Undo" button for last week.
No History: You look at a line of code and ask, "Who wrote this? And why?" Without Version Control, there is no answer.
Why version control became mandatory in modern development

A version control system is very important. Suppose we are working on a very big project in which there are more than 1000 people and all of them are working together on different features, then the Version control system is very important there.
Version Control acts like a Time Machine and a Manager:
The Time Machine: It remembers every version of the project. Every change made by a specific programmer must also be remembered.
The Manager: It merges everyone's work together perfectly without deleting anyone's code.




