Why Version Control Exists: The Pendrive Problem
If you have been a little bit in the developer world, you might have heard about Git. Well Git is a version control system, First of all you might ask why do we need version control ? Why use a software to control the codebase. In this blog you learn about why we need version control.
The Pendrive Era
Imagine you are working on a website with your friend, you save your code in a pendrive and hand it over to them. While working, your friend deletes a line of code by mistake. You don’t realize it until 3 days later, how will you get that line back ? In old days, you couldn’t, this is the reason why version control system was introduced to developers.
There was also a problem, using a pendrive to store code only 1 person could work on the project at a time or even if all people work on different copies of the codebase, manually merging them will be the real headache.
Without version control everybody’s project structure had files like final, final_v2, latest_final etc. and this is a nightmare for every developer.
The Big 3 Problems with Manual Control
Overwriting:
Without a system to track changes, if two people are working on same file the person who saves the last change wins hence deletes the work of the 1st person fully without warning.
Zero Accountability:
When the app crashes, no one knows who in the team changed the code last that caused it.
No Undo:
If a line of code is deleted, it is deleted there is no way to revert back to the old code and hence it makes difficult to experiment with the codebase.
The Transition: Enters Version Control
Version Control was introduced to developers to act as “Time Machine” of the codebase which also allows collaboration of multiple developers at same time working together. Instead of passing pendrives now developers could only focus on code and push their changes. It is the system’s responsibility to track who was the author of which commit and was the reason and changes in it.
Thank You
With this, the blog ends and now you know why we needed Version Control Systems like Git and what problems developers faced before it was introduced.
