Your manager at work asks you to work on a critical research task. You work hard on that and submit the first version of the document for review. There is a lot of review comments from your manager in which you are asked to remove some existing content and add new content. You work on review comments and submit the second version of the same document. You are asked to incorporate again some previously removed content. If you have the first version of the document than you can include those removed lines easily. If you don’t have that then you may need to rework on the same. This is actually an example of a Version Control System and you can just imagine how much it is useful.
It was just one docuemnt and one person is working on that. There is a huge code repo When we develop software or writing automated scripts for testing. Multiple developers will be working on the same repo and they will add, delete, modify script files. If we do not keep tracking of those changes then we will be in mess. All we need here is a Version Control System. It is also called Revision Control, Source Control, or Source Code Management(SCM).
Did you know that I have started a YouTube channel as well and I need your support to make it successful. Please do watch content then comment, like, share, and obviously subscribe.
Version Control System
A Version Control System is a utility or software which helps us to track and manage changes to a file system or code repo for better collaboration among developers to develop an application. It can keep history of changes into a file including who has changed and what was changed.
I will give some scenarios below which will help you to understand why do we need a VCS software.
- If multiple developers are working parallely on same code repo then how code from all developers will be merged and shared across all developers? It will not be feasible to wait for one developer to finish the coding first and then share the updated code base with another developer.
- Suppose the changes from a developer breaks the functionality of an application then It is required to know who has modified the code recently and what was modified. There should be a mechanism which allows us to undo the changes.
- Multiple developers can add codes for new features to the same code base at the same time and that can be deployed to different environemnts to test individually. Merging all those codes will be a challege.
- You have stored code repo in a system and if that system is crashed then you may lose all codes. VCS can help to backup code base in a central or distributed system.
- For DevOps process, storing code in a local system will not help.
- Comparing different versions of same code repo and including what works for best is error prone if done manually.
There are many numerous scnarios where you really required a VCS which we will see in upcoming posts.
Types of Version Control System
There can be three types of Version Control Systems:-
- Local VCS -> Files are stored locally on a system.
- Centralized VCS -> Files are stored on a single server.
- Distributed VCS -> Files are mirrored with full version history to other systems. Git is a distributed version control system in which repositoroes are cloned to developer’s system.
You can subscribe to my YouTube channel RetargetCommon to learn from video tutorials.
If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.