Why version control exists: the pen drive problem

Developing an application is easy, but the difficulties come with maintaining that application. Any application is built on someone’s local machine, and now the challenge is to ship that application to a server or someone else's machine. Generally, shipping a physical product through a courier and shipping an application are not very different; it works the same way, but the medium has changed.
Let's say you have written a complete todo application where you can add and delete your daily todo list and maintain it on your local machine. Now, your friend wants to use that application on his system. So the general and easiest way to share that code is to copy all the files to a pen drive and give it to your friend. Now, your friend is using your todo application on his machine, and wahoo! You will feel so proud that you did a wonderful job.
One fine day, after gaining some coding knowledge, your friend added a simple and important feature where he can modify his created todo item, which is a new feature that was not present earlier. He modifies all his code in the existing coding files that you shared with him.
Meanwhile, you have changed some design layouts of that application to look more appropriate and beautiful on your system.
Now the time come when you want to share that design with your friend and your friend want to share that additional feature with you.
If you took your friend’s code into your machine, your recent design changes will be overwritten and the other side if your friend took your code, his functionality will be overwritten.
Now the problem arise!! This problem occurs when only two person involved but think of a large application where multiple team member are working on same project, multiple people are working on even same project files.
So to solve this problem version control system has introduced, using version control every change (add, delete, modify) to project files in a special repository, creating a history or "time machine" for your code, allowing you to see who changed what and when, compare versions, and easily revert to older, stable states if errors occur, all while enabling seamless collaboration by managing simultaneous edits from multiple people through concepts like branching and merging. It prevents lost work and conflicting edits by offering a central record and controlled ways to integrate changes, making development safer and more efficient.
Types of Version Control System:
there are two types of version control system:
Local Version Control Systems (Local VCS)
A Local Version Control System operates entirely on your local machine without any connection to a remote repository. All changes and version history are stored in a local database on your computer.
Centralized Version Control Systems
In a Centralized Version Control System, all the files and their version history are stored in a single central server. Developers connect to this server to access or modify files.

Image reference: https://www.geeksforgeeks.org/




