Version Control Systems

Version Control Systems

is learning VCS Mandatory?

Table of contents

No heading

No headings in the article.

I Was thinking to write up a blog on Version Control Systems for a long time and finally, I'm writing it now. So before diving in, let me clear up all your myth if you think learning VCS is a sort of nightmare! Well, Frankly Speaking(though writing😁), it is not like that. It has came up to facilitate us in every possible aspect when it comes to building or working on the projects in the team.

So, to all the Folks out there who have just started their career in Tech, I would like to express my hardcore thoughts to them that I agree for beginners it could be a bit tricky learning VCS in their initial phase of learning but trust me in the long run, it will be really very helpful. You Might not realize its importance now but that's the Universal Fact! which you will be realizing eventually.

Okay, to none of the Surprize...By reading out this and the blog coming next, I guarantee that you will learn this beautiful concept in a very easy manner.

So, Stay Tuned! for the next one.

Okay! So Are We Ready ? So, As Usual! Tight Up Your seatbelts folks as we are ready for the take-off!🚀
Lets Begin!

What iS Version Control Systems ?


What-is-Version-Control-Systemwe.jpg Version Control Systems is basically like other systems designed to accomplish a specific task as several other systems are designed to get tasks done!

Version control systems are a set of software tools that helps in recording changes made to files/folders by keeping a track of modifications done in the Codebase so that developer can recall the specific changes made in the codebase by going back in the history of Commits.

In layman's term, it is the software that helps in maintaining the records of code-pushes by various developers so, that in the future if any sort of mischief happens with the build, we can easily track and resolve the issue and it also helps in tracking which developer made what change in the code.


Why Version Control System is Important ?


slide_5.jpg

The Biggest upside of the Version Control System is that it lets the developers communicate efficiently and tracks all the changes that have been made in the codebase along with information like who made it and what changes have been made.

Let us Understand its importance by an Example!

Suppose, You and Your friends are working on a project in a team, Of Course! everyone in the team will be collaborating on the project by writing up some code right ? Cool, but the point of concern is that all are working in the same file in their own local system....How other members will know about the changes made by you in the project ?

One solution could be that you ensure that at one time only one of the members is working on the project and once you are done with the modifications in the project, you can share that codebase with your team members and now other members can work on it and the same thing goes on and goes on.......

BUT WAIT!
👉 You might have noticed something that, this cycle of modification and then sharing up is not at all efficient and the task is getting repetitious and can take enormous time in the process of development!

👉 Let’s suppose if one of the members in the team add some new functionalities to a project and the modified version is not working properly which he might have not noticed so another problem is you can't go back in history where the hell has error occurred, you have to analyze the whole project to figure out.....isn't that horrible ? Of Course! it is.

And Now, think in the Software Companies Team of Developers are building up the software as we know that a software product is developed in collaboration by a group of developers they might be located at different locations and each one of them contributes to some specific kind of functionality. So in order to contribute to the product, they made modifications to the source code(either by adding or removing).

How They Will Track The Changes Made by the other developers ?

image-blog-version-control-best-practices.jpg

Yeah! You Guessed Right, The Solution is that some kind of system is needed to track all these crucial things. Here Comes The Version Control System

A version control system is a kind of software that helps the developer team to efficiently communicate and manage(track) all the changes that have been made to the source code along with information like who made and what changes have been made. A separate branch is created for every contributor who made the changes and the changes aren’t merged into the original source code unless all are analyzed. Once the analysis is done and the results are coming as expected, they are merged into the main source code. It not only keeps source code organized but also improves productivity by making the development process smooth.

Version Control Solved our second problem too i.e., if a developer made some changes by adding/removing some functionalities, but it not working properly...No Problem! this time As the version control system keeps track of our work so with the help of VCS we can omit the new changes and continue with the previous version....
COOL....Right ?
Told You!😌

By Now, I Think You Have Well Understood the importance of VCS...if Not, You can openly ask your doubts in the comment section

Hence, it won't be wrong saying Version Control System is a Boon for all the developers out there

copy-of-what-is-version-contol.png

Types Of Version Control System :

👉Local Version Control Systems
👉Centralized Version Control Systems
👉Distributed Version Control Systems

Local Version Control System (LVCS)


local.png

A local version control system is a local database stored on your local system, in which every file change is stored as a patch. Every patch set contains only the changes made to the file since its last version.

The main problem with this VCS is that everything is stored locally. If anything were to happen to the local database, all the patches would be lost. If anything were to happen to a single version, all the changes made after that version would be lost.

Also, Collaborating with other developers or a team is very hard or next to impossible

Centralized Version Control Systems (CVCS)


Centralized-Version-Control-System-Workflow-What-Is-Git-Edureka.png A centralized version control system has a single server or a repository that contains all the file versions. This enables multiple clients to simultaneously access files on the server, pull them to their local system or push them onto the server from their local system. This way, the development team knows what other developers in the team are doing.

This allows for easy collaboration with other developers which is a plus point in regard to the Local Version Control System

It has a major downside too, which led to the development of Distributed Version Control System. And the downside is very straightforward! You might have guessed it correctly and i.e., what if the central repository in which developers are collaborating goes down during that period of collaboration and we know saving versioned changes is not possible here. What if the hard disk of the central repo becomes corrupted, and proper backups haven’t been kept? You will lose most probably everything...Hence it is Risk Prone!

Distributed Version Control Systems (DVCS)


Distributed-Version-Control-System-Workflow-What-Is-Git-Edureka.png As The Name itself suggests i.e., Distributed, here there are multiple repositories(files/folders)...Avoid understanding these fancy words like Repositories as of now, will see them in the next blog in detail. For now refer it as Folder. :D

Each Developer member has their own repository and the main source copy where he/she works on. When you modify something, it doesn't get reflected in the main source and others also won't get access to the modifications made by you even after you made the commit. Committing the changes will just reflect the changes in your local repository and in order to make it visible to others, you need to push it onto the Main repository or the Central Repository by generating the Pull Request...Still not ended finally, the maintainers of the repository to which you are pushing in must accept your Pull Request and finally merge it into the main repository.

iN A Nutshell:
👉You Commit
👉You Push & Generate Pull Request
👉They Pull
👉They Update via merging your Pull Request

Git is The Most Popular Distributed Version System.


With That Set, let us End Up Here!, I hope that I was able to add some knowledge and values in your learnings through this blog!
Still Doubtful ?🤔🤷‍♂️ Comments are always open. I will be Glad to help!

#Important
Coming Up Next With The Git & Github, Knowledge of VCS was the prerequisite for that, and trust me from then onwards you'll start using VCS on a regular basis, we'll be witnessing through example!



P.S., If You got encountered with some high technical words in the blog like Pull Request,Repositories, etc., and thinking about what do these mean Don't Worry We will be discussing each of them in detail in the next Blog! So, Subscribe to the iCoders newsletter so that you never miss an update from us.

Remember : "Never Believe A Prediction That Doesn't Empower You!"
Keep Grinding! Keep Hustling!

Did you find this article valuable?

Support Prakhar Sinha by becoming a sponsor. Any amount is appreciated!