Skip to main content

Command Palette

Search for a command to run...

Why version control exists? The Pen-drive Problem.

Version control existence and Problems before version control existence

Published
2 min read

The Problem :

First Problem : Before version control, we couldn’t track changes of our project over time. Even if we wanted to do so. Then we needed to copy paste previous content (or folder) then add changes to copied folder. and those folders look like these : project_old, project_final, project_final_final.

which is total mess to manage, and consumes too much disk space, and difficult to know difference between different versions.

Second Problem : The problem of collaboration. Imagine if you are working on a project along with a team. and to share project along with team members you are using a pen-drive.

Pen-drive Analogy : Now if you fixed a bug in project and then handed over pen-drive to another teammate. And he adds a feature and update project folder. He/She might overwrite your content(code). You can’t work together with your teammates on same project simultaneously. One more thing you guys can’t work remotely like that with a pen-drive.

(IMG Source : https://medium.com/@rushisalunke006/why-version-control-exists-the-pendrive-problem-b47cd7f126b3)

Third Problem : Lets say you want to update or optimize a part of your project. You delete some part from code and add new code. But code crashes. You try to undo. But due to large length your code editor is unable to undo. So, you have lost your code forever and you have to rewrite it now.

The solution :

VCS (Version Control System) : a version control system is a software that tracks changes in your project over time. examples are SVN, Perforce, Git, Mercurial.

Fixing Changes track : VCS stores changes you made in a hidden database(folder, the repository). Keeps the history of changes.

Fixing Collaboration Collisions : It automatically combines(merges) the changes made by two different person on a single project/file by comparing it line by line. By this it prevents from overwriting.

Fixing problem of Undo : If a bug appears in any version. we can simply check version history. By checking log to find exact version which have bug. Then we can reset or revert to remove that bug.

VCS Remote : is a common repository over the internet(a server).Remotes are the servers where we share those changes. example :- GitHub, Gitlab, Bitbucket etc.