Why version control Exists: The Pendrive Problem
Problems Before Version Control Systems:
Soo , before learning what actually is version control , lets start with why to even use version control , what problem it actually solves-
Imagine you are working in a company with very large set of codebase , you want to edit some changes to the codebase and changed some lines of code , but other developers never know about those changes ,there can be many developers working for same project , they would have a hard time knowing who had changed the codebase and WHY? . They had find it manually which was a developers worst nightmare . And the worst part is there is no track record and history of the changes . This would make it really difficult for many developers to coordinate .
Pendrive anology
Lets go back in time , there was now other resources for sharing the codebase to other developers , so pendrive was the only option for it . Developers litreally shared their code like we share photos or movies ;) . They saves the code in pendrive and then hand it over to other developer , such a hard time ..
Suppose developer-A saves the code in the pendrive and then handover to developer-B , then developer after saving changes , handover it to developer-C and this chain continues to go on..
Because the pendive is being given to many developers , the folder name starts to change-
project → project_new → project_final → project_final_working → project_final_real
This scenario (Pendrive Analogy) was very popular before the advent of version control.
Then their comes our saviour- one and only Version control systems(VCS).
Version Control Systems
Version Control Systems is a tool that keep records of the changes made to files/codebases so that developers can see what changes , know who changes it , go back to older versions & let developers to collab and coordinate.
COMMON STEREOTYPE - Many developers directly assumes that version control is the git/github but it is not . Version control is the idea/concept of tracking the changes of the files over time. Git is one of the version control systems , others VCSs are subversion, mercurial etc.