Why Version Control Exists: The Pendrive Problem

I believe writing makes learning easier so I share simple Tech notes with diagrams
Introduction -
As we know that as a Developer/Sowftware Enginer we create , add , update or save files which is like making changes day by day on some project/task. Sometime we work alone on that project and sometimes other collaborators or we can say your team partnes they could also work at same time. So the issue we face here only single person can do work (changes , add, etc) at a time on the orignal code and after that when multiple members start working on that same project they can’t keep the record of changes made by others members. Thats why Version Control System (VCS) is a system was intruduced by Marc Rochkind as Source Code Control System (SCCS) which helps us in saving , managing and tracking the changes in our project files so that we can work with less effort and without losing data.
The Problem -
We face problems like :
People keep file names file1.zip , file2.zip or file_final.zip , filefinal_1.zip which creates confusion many times.
Sometimes 2 or 3 peoples make changes on same files this may create errors/problems.
If we don’t use VCS then we can’t know who changed file , what exactly changed , when it was changed , etc.
Many times if someone overwrite or delete the file by mistake then the whole orignal file is gone we can recover it but there is no easy way to recover it.\

The Solution -
Version Control System solves problems by keeping project safe and organised. It records every changes made by multiple peoples in the project files and it also keeps the complete history of all versions. If something goes wrong we can return to the old version/files , as it also helps were multiple people can collaborate.
It supports a features liike Branching and Merging were Branch means working separately on new feature for project without disturbing the main/orignal project. VCS is like machice which records exact time of changes made & made by whom , has backup system and team collaboration tool.

Implementation -
The solution to the problems is implemented by using tools like:
Git (most widely used and popular)
SVN (older, but still used in some companies)
Basic git workflow: start version control (git init) → Add files to git tracking (git add) → Save changes permanently to which we also call Commit (git commit -m “message“) → Upload code to online repository to which we also call Push (git push) → Create separate branch for new work (git branch feature-name) → Combine branch work back to main code (git merge feature-name)
git add
git commit -m “message“
git push
git branch feature-name
git merge feature-name
There are platforms which are used with git to store projects online/on servers such as GitHub , GitLab , Bitbucket , etc.

Conclusion -
A Version Control System (VCS) is very important for managing projects because it helps us track changes , avoid losing data and work with team easily. It keeps a proper history of the project and allows developers to safely create new features using branches and merge them back without problems.
That is why tools like Git and platforms like GitHub are widely used in real world software development.


