Recent Posts
- jQuery attrAugust 12, 2021
- jQuery mouseenterAugust 9, 2021
- jQuery ToggleclassAugust 6, 2021
- jQuery attr
Introduction to GIT Version Control System
Git is one of the most common term heard between programmers in the last four-five years. I will present here some insight into this tool and why it is so popular among programmers. In this topic, we are going to learn about GIT Version Control System.
What is and why version Controller?
Linus Torvalds who started the Linux kernel is the person who created this software to maintain and track different versions of source code among the programmers.
Scenario #1
Imagine a team of five members who are working on master source code enhancing different features to it. Just think how can they work on the same source code without confusion on each other changes? Each one has to know what others four are doing and there shouldn’t be any negligence to it. And by the end of work hour, they have to spend some time coordinating each other works so that at last one source code is maintained. It looks a lot hectic and definitely manual intervention in maintaining source code is riskier. So to help or to say to automate all these versions on which all the five programmers are working we need properly written version controller and GIT is one of them. There is a term for the above steps and its called Source Code Management or Software Configuration Management (SCM).
Scenario #2
Now consider one more scenario where version controller automation helps. We have written the first version of code and the client has approved to install it on production lets this is version 1.0. Now after a few months, client offers enhancement work and you work on earlier written to develop version 1.1 and submit to the client. But the client suggests a different approach and this version 1.1 is not useful to you according to the client’s new approach. So you discard this and work on version 1.2 which gets submitted and approved. And so on you keep working in developing different versions. But don’t you think manually saving all versions somewhere and maintaining source code is not messy? At some point in time, you might need to refer to version 1.1 which you discarded and doesn’t have handy.
So to maintain different versions of code written by one or multiple programmers we use version controllers.
Different Types of Version Controller
There are different types of tools available and below are some of them
Basically, there are two types of version control system methodologies on which the above tools work upon. They are
Centralized Version Control System (CVCS) Distributed Version Control System (DVCS)
1. CVCS
Here the code written stored in the centralized repository or in the centralized server. No working copy available at local machines which is a huge disadvantage when there is server failure. I need to have an active server connection always to work on the repo. SVN uses this control system
2. DVCS
Here also we have the source code on the server but along with that, we have it as local copy on working machines. So even if there is a failure at the server level we can mirror back the local working copy to the server when it is restored. This availability of local working copy on each machine responsible for the term ‘Dsistriibuted’ in DVCS. Git, Mercurial uses a distributed version control system
Git uses the concept of branching or more technically called as Trunk Based Development TBD. What it actually means is that we can create multiple branches from the master and on these branches, programmers can work and commit their changes to these branches and each of these commits is tracked. And once clients approve we can merge all the branches to the master code in the production. In this way are not impacting the master source code directly. Working on master source code directly will be riskier and needs to be avoided. We can work on branches and perform various testing scenarios and once the final version is stabilized and approved we can work on merging it master which reduces the risk by a significant amount.
Git is actually free and for Mac users, it is available for default. In Linux, we can install git and for Windows, we have something, Git Bash. There are two most popular repository sources where we can work with Git and they are Git Hub and Bit Bucket and organization choosing to base on its preference.
Advantages of GIT Version Control System
Below are some of the advantages described.
Working with Git
Git is the most commonly used Distributed Version Control System because of its distributed nature, no single point of failure and is open source. You can try working with it using sample code in GitHub and GitBash in windows PC as git commands are simple and easily available online.
MCP is the right place for best computer Courses institute and advance Courses in Mohali and Chandigarh.The Complete Programming Academy can change your life – providing you with the knowledge, skills, and performance in a second language which helps you to excel in your job.You can also Contact us for 6 month industrial training institute in Mohali.