If you have worked with codes then you must have come across the words like Git and GitHub. It is also possible that you might have used them as well. But do you know what exactly is Git or GitHub and how they are different from each other? Well, if you don’t, no worries! It’s never late to learn new stuff nor its that tough in this case. Read this blog on Git vs GitHub, in which I will be giving you a complete insight of both. I can assure you, by the time you this git vs GitHub blog you will have a clear understanding of both the technologies.
Following are the topics I will be discussing in this Git Vs GitHub blog:
To understand the exact difference between git and GitHub you first need to know about version control. So, what do you understand by the term version control?
The term Version control refers to a system that records changes to a file or set of files over time called the ‘versions’. In other words, these versions will help you in tracking the changes in your codes/project and if necessary, undo those changes as well. This feature of being able to compare, differentiate and revert changes between two versions of a particular project becomes really helpful when working on a larger project. Larger projects mean more people working on the same code which increases the chances of conflicts. Using version control you can easily prevent these conflicts.
LEARN FROM INDUSTRY EXPERTS
This system which controls the versioning of the codes is called a Version Control System (VCS). For a better picture, you can think it as a ‘database’. Within this database, VCS takes snapshots of your entire project and stores them as versions. Now with the help of these snapshots, you can easily compare the versions and switch between them as per the need. Check out the below picture which shows the entire process:
I think now you clearly understand the concept of version control. One thing I would like to mention here is, don’t get confused between a VCS and a backup/ deployment system. This VCS totally eliminates the need for changing or replacing the toolchain completely unlike the backup systems. Below I have listed few of the advantages of using version control:
So now let’s proceed ahead with this blog on Git vs GitHub and understand what exactly is Git.
Now that you know about the version control, it will be really easy for you to understand about Git. So, what is Git?
Git is a version control software which you need to install on your local system in order to use it. For an individual working on a project alone, Git proves to be an excellent software. But what if you are working on a project with a large team. All will be working on the same project but each of you will be having a different version of the same project. Suppose you have made changes in the project directory on your machine and you want to send those changes to your collaborators. Also, you want the changes they make to appear directly in your machine’s project directory. As working on a project, being on the same page with your teammates is very crucial to avoid any type of conflict. So, how you will do that? Well, no worries Git takes care of all but the only condition here is, each of your team members must have Git installed on their systems.
Git also is known as distributed version control system which means using Git you can push and pull yours as well as others changes to other people’s machines:
Now, using Git you can work on the same copy as your team member. But the copy on which you will be working, won’t reflect any of the changes in the main directory unless and until you pull your collaborator’s changes and push back your own changes.
In today’s market, Git is the most widely and popularly used modern VCS. It is quite matured and is a well maintained open source project. It was developed back in 2005, by Linus Torvalds who is also the creator of Linux OS kernel. If you check the above picture of the Google trends result, you will find that Git has continued to grow in the market since 2005. A varying number of software projects, including commercial as well as open source, completely rely on Git for their version control. So, how Git is different from the rest that makes it so popular?
The major difference between Git and any other VCS like Subversion (SVN), Mercurial, TFS, Perforce, Bazaar etc., is the way Git stores its data. In other systems, information is stored as a list of file-based changes which is also known as delta-based version control. But in case of Git, it stores its data in the form of a stream of snapshots of a miniature filesystem. With Git, whenever you commit or save the state of your project, a snapshot is taken of the present file state and a reference is stored for it. If no changes or updates are done then Git stores a link to the previous file that it has already stored. Following diagram shows how Git stores the versions:
But Git will only be helpful when you know when is your collaborator’s system is turned on and is connected to a network. So what will you do when your team members are not online? In these situations, a third party having an identical copy of your project, from where you can easily push and pull the changes, will come in handy.
Well, you will be glad to know that, this is what GitHub does and in the next section of this blog on Git vs GitHub, I will explain all about it.
As told, Git is a version control system which tracks the changes when working with computer codes while GitHub is a Web-based Git version control repository hosting service. It provides all of the distributed version control and source code management (SCM) functionalities of Git while topping it with a few of its own features. It is a heaven for the developers where they can store their projects and get connected with like-minded people. You can think it as “cloud for codes”.
So basically it is a place to store your identical working directories or repositories. It literally is a hub for the Git repositories which you can use, simply by creating a free account on the GitHub. These accounts come with an abundant storage space where you can store your repositories and build a proper profile which holds a great value. By default the repositories are public i.e., everyone can see your codes but you can make it private as well. So if you are a good coder you can upload your own applications and programs and get recognition from others.
It works along with the collaboration of Git. While Git is a command line tool, GitHub is a Web-based graphical interface which provides you with the access control, basic task management tools along with several collaboration features. Moreover, GitHub can host your project’s source codes in various programming languages and keep the track of the each of the changes made to every iteration. GitHub’s functionality doesn’t end here. It provides following 3 extraordinary features which makes it so powerful:
If your pull request is accepted by the owner then you get its credit on the original site and shows up in your user profile. It is a kind of a resume that helps the GitHub project maintainer to determine your reputation. So, more the people and projects on GitHub, the better idea a project maintainer gets of its potential contributors. This encourages the young developers and projects to grow more in the industry. I hope now you understand what is Github. So let me now summarize the basic differences between Git and Github.
|1. It is a software||1. It is a service|
|2. It is installed locally on the system||2. It is hosted on Web|
|3. It is a command line tool||3. It provides a graphical interface|
|4. It is a tool to manage different versions of edits, made to files in a git repository||4. It is a space to upload a copy of the Git repository|
|5. It provides functionalities like Version Control System Source Code Management||5. It provides functionalities of Git like VCS, Source Code Management as well as adding few of its own features|