What is GIT and GitHub | The Ultimate Difference

Many people who have just started to work in a collaborative environment encounter with the term Git and most of the time they are not able to differentiate between Git and GitHub. Here in this post we learn about Git and GitHub and see how are they related to each other. Also, Git was created by Linus Torvalds (the mastermind behind Linux) and is written in C#.

git-vs-github

First, we will understand what is GIT :

Git is a piece of software which increases our efficiency while writing the code. Git is a Version Control System: manages the changes in your code with time, other VCS tools being – Apache Subversion, CVS, Mercurial. It also provides collaboration between different members of the team.

The directory which contains your code and its dependencies is called a Repo (repository). In Git we have 2 different repos

  1. Local Repo: modified by an individual developer and resides in the local PC of developer
  2. Central Repo: acts as the main repo and resides on a server, all developers make changes to the local repo and push it to the central repo.
Git-work-flow
Workstations are local PC of Developers, Repository is the local repo of developers and on top we have central repo.

Some feature of Git :

  • Distributed Version Control System
  • Git uses SSH to connect to the central repo
  • In the local repo, there is a folder named [.Git] which contains info about your local repo
  • Many developers can work on a single project at a time
  • We always have a backup of code in local repos, in case the central repo fails

Click here to know about Git Commands

What is GitHub :

GitHub is nothing but a company that allows you to host your central repo on the Internet. You can even create a central repo in your local network but it can’t be accessed over the internet.

GitHub.com has created a user-friendly design and easy to manage the central repo, but at its core its just a central repo on the internet.

On GitHub, you can create a repository for every project you are working on. GitHub offers you unlimited public central repo(can be seen by anyone on the internet) and private central repo with a limitation of max 3 developers working on the project.

It’s always a good idea to create a readme file in your repo as it helps an unknown person to get a brief idea about your project. And people who have added their ssh key to the central repo server can modify the code.

So, in a nutshell, Git is a piece of software which helps to manage our code and GitHub.com is a website which allows us to use a feature of Git which is central repo.

Leave a Reply

Your email address will not be published. Required fields are marked *