A very good day for all of You. I welcome you all, in the tutorial on the Git and GitHub. First of all, we will cover all the basics terminology associated with Git. Today we will concern only with :
- What is Git and What is Github?
- What is the version and Version Control System?
- Different Type of Version Control Systems:
So Let’s just start:
If you have gone through any tutorial of git before, you might have heard that Git is a Version Control Tool that lets you manage your project and keep the record of all the changes that you performed during the development of the project on your local System. While GitHub is a Distributed Server that keeps your changes at the remote destination. So that, whatever you change at your local system can be accessed from anywhere any location.
If you still don’t understand the difference between these two terms, consider the corollary given below:
Git as your safe/locker at Home
As you know safe lets you store your money or jewelry, so as Git lets you store the version details of your project. You can change the content of your safe whenever you are at home. Similarly, you could do changes to git only when you have Your local System with you. Your local System might be any device, i.e. your personal computer or laptop, or it might be your office.
GitHub as your Bank
The money kept in your locker is not much secure, so there comes a replacement of safe as Bank. Bank provides you more security and greater accessibility than safe kept at your Home. Likewise, GitHub stores your project as a repository at the different distributed server and provide you with some sorts of security without charging any cost.
I hope you know have been cleared the difference between Git and GitHub with this corollary. So let’s Just move ahead and discuss:
A version is state of your working repository, more precisely said it is a snapshot of state. A state is a temporal factor that may vary with time, but a snapshot of anything has a time stamp associated with it that stores the state of the object at that particular time. Consider the corollary of the art/drawing to understand what clearly a version. In Drawing, there are many phases involved till completion of drawing, like the creation of layouts, Shading, adding Colors. These are the four different versions of a sketch, that leads to final sketch, shown in the fourth image. Though this image doesn’t allow to switch to any one of the four Versions created but only to view the versions.
While Git provides us the freedom to switch among any versions, which I will describe in upcoming posts soon.
Version Control system lets you keep the track of various snapshots of your working directory and manage them.
There are basically three types of a version control system as mentioned above, we will discuss all of them one by one:
As the name suggests Local Version Control System, Local Version Control System resides in your local computer System. The simplest Version Control System can be maintaining multiple copies of the work in a different directory. For better management, you could name the directory with a timestamp, i.e. (a directory name + date and time with that name). You could do this simply entering date and time along with directory name in GUI interface or if you prefer Commands over GUI you could check one of the following links according to your OS.
Since the method explained above create multiples of copies of the same or a bit modified content, that leads to space problem and also leads to difficulty in remembering the file paths of each copy and maintenance problem. So programmers created a Local Revision Control System (LRCS), that maintains a local database and keep tracks of every version ( by recording the difference between two versions as a patch in a special format) and allow the user to switch from one version to other easily(by adding patches to the subsequent version).
Now the LVCS was created on your local system, which means that teams can’t collaborate with each other using LVCS. Moreover, space can be also a problem in LVCS. So these problems lead to another solution, the emergence of a Centralized Version Control System(CVCS). Popular CVCS were being, CVS, Subversion and Perforce. In Centralized Version Control System, many users can simultaneously update the changes at a Central Server as shown below. All data is kept at a single central server, which has its own pros and downfalls.
The benefits include:
- Simultaneously many users can post into a single Storage Location.
- Have the ability to control, who can post or who can view only, i.e. has management rights.
The disadvantages include:
- If the Central Server fails to service, the whole user community has to wait until it comes back to its original state.
- If the hard disk of central System damage than the whole data will be lost, if there were no backup.
To overcome the problems of CVCS Distributed Version Control System comes into action. In DVCS, the data is copied not only to a Central Server Database but also between clients Local Database, i.e. When a client collaborates to working repository he not only get the differences between the snapshots but the whole data is copied to his/her Local DataBase of Version Control Tool. It might be said that DVCS is a Combination of CVCS and LVCS. The popular DVCS are Git, Mercurial etc. The risk of losing data has been minimized.
That’s for all today, a new post will be out soon, that will be totally based on the Git basics, Hope You understand everything very well if you face any issue feel free to comment your issue at Git Forum – https://tekraze.com/forums/forum/git-github/ . Don’t forget to share with your friends, because sharing is caring.