Version Control & Git
Jul 23 2019Working on a project with a distributed team becomes a hassle especially when multiple releases, bug fixes, patches are to be carried out. The most impacted resource here is the source code repository which is being grinded, twisted, updated and what not. Who’s to the rescue? Of course, Version Control.
“Version Control is a system that records changes to a file or set of files over time so that you can recall specific versions later”, as stated on the introductory page of Git version control. It cannot be much simpler than the above description. Version Control System,is a whole category of tools used to help software teams to manage changes on source code and keep a track of it over time. Source code is the most valuable possesion as it reflects the hard work and knowledge team has put up in bringing out an application or product. Version control helps in maintaining a version of our code in case of any catastrophe or not-so-called for hazard. Recovery from that point becomes extremely easy and helpful. And it becomes easy to keep the track when, our team involves different developers working on separate contributions. Two categories which have been widely adopted for Version Control Systems are: Centralized Version Control Systems & Distributed Version Control Systems.
Centralized VCS, have a single server which contails all the files with their versions and multiple clients check out files from that place. It offers few advantages like, all the members in our team knows what everybody else is doing to some extent. It is quite easier to administer CVS than to deal with a local version of source code. But, there are some serious downsides. Single point of failure which can come with the single centralized server. If this server goes down then during that time nobody in the team can collaborate at all. Some popular CVCS are, Subversion, Perforce, CVS.
Distributed VCS, on the other hand offers an easy way to keep a local copy of the whole repository of our source code along with the full history. So, if any server goes off and these local systems were collaborating via that server then, client repositories can be copied back up to the server to restore it. Few more advantages like helps in tracking every individual change by each contributor and help in preventing any simultaneous work from conflicting.
Well, Version Control has come a long away ever since it’s start. And these days, most widely popular and used is Git Version Control System. Git was designed by, Linus Torvalds keeping in mind the following things(from the actual Git documentation): Speed, Simple Design, Strong support for non-linear development, Fully distributed, Ability to handle large projects. And since then it’s been a huge success and most widely adopted Version Control System ever. Git implies all the above mentioned factors allowing it’s users more distributed and local-only workflows.
I’ll be continuing in the upcoming posts on how I’ve been learning to use Git in a better way over the past few weeks, as part of dgplug summer training. Also, some essential Git commands and frequent issues which I’ve faced while using Git as part of my daily work. Stay Tuned!