What is git Hub and how to use it ?
you must have heard the word ” git hub ” or just “git ” if you were searching anything related to software programming or any programming language such as Java,c++,asp.net,etc. so, let’s get started with the Question ” what is git hub ?
Consider a very basic scenario. Say that you are a group of 4 friends and you guys decide to work on a specific project. So everyone has a set of assigned tasks that they have to complete i.e. individual components to build and then what is decided is that they will finally merge all the code. So after all the individual components are built, they sit together and merge all the code and the complete code is now available with all the four friends
This seems to be easy in the what if in future some major problem arises and they just want to rollback to a previous version and work their way up from there all over again. ?
So for this, all the four developers will have to keep a track of all the stable versions of the project in their local systems (or maybe one system as this seems easy to maintain.) However, in case their system crashes, then all the code is lost. It’s simply gone. So there are a lot of points of failure in their system.
It is also possible that in the future you might not know the files that your friend modified and whether it is compatible with your code.
Believe me (for those who haven’t developed an app or haven’t been in a project yet) this job takes a hell lot of time and also leads to huge amount of confusion.
image credits : makeameme.org
So what they basically need here is a version control system. What we generally do for smaller projects is adopt the concept of a local version control system. Git is also a version control system. It is basically an SCM.
So SCM basically stands for Software Configuration Management. The basic utility of an SCM software is that it is used for keeping track of the changes made to a software under development etc. So in case something goes wrong with the software, SCM will be able to track as to who made the changes and what were the changes that caused the problem. It is also used for version control purposes. So that in case some latest version is not working out properly, so we can shift to a previous version as well. We can keep track of the changes made when we shift to a newer version.In short, we can say that Git is a distributed version control system.
A version control system allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more. Using a VCS also generally means that if you screw things up or lose files, you can easily recover. In addition, you get all this for very little overhead.
hello again, i think you have read a lot, it’s time to take a break and then we will continue further with the types of version control systems.
We generally have three type of version control systems.
- First and the most basic one is the local version control system. So as the name suggests, in the local VCS, we basically store the various versions of our software in our local machine itself. eg: in a different directory etc. However, we can clearly see the disadvantages of this approach that we have to keep track of everything ourselves. It is quite possible that we can make changes to a wrong directory. Also if we need to collaborate with other developers, then that is not possible in case of local VCS.
- Now let us discuss something known as the centralized VCS. In a centralized VCS, there is a single server that handles all the files and resources of each individual client. The disadvantage that is clear from this is that there is a single point of failure. So if the server crashes or something, then the entire project is lost.
- To deal with the problems of the centralized VCS, something known as theDistributed VCS were developed. So what actually happens in DVCS is that the entire system works on mirroring of the repositories. So the entire code is copied whenever we choose to clone some repo available on the DVCS like Git.
question inspired by quora