Techpadi

Git and GitHub: What’s the difference? How are they related?

If you are a developer, and have worked on a project with other developers, you would have heard about Git and GitHub, and would probably have worked with either or both. However, for someone new to computer programming, these two might come across as one of the meme-worthy confusions in the field, like Java and JavaScript.

While there are common misconceptions about the two, developers that have used both services will tell you these are two completely different entities, because, for starters, they are owned by different companies.

Let’s take a closer look at the two, and see why they are so popular among developers. One term you are guaranteed of seeing as this articles proceeds is “Version Control” and we will dissect that too. To ensure you don’t get lost along the line, let’s talk about what Version Control is.

What is Version Control?

When you work on a project, hardly do you just start the project, and work on it till the end in one go. You’d more likely than not, have to do series of editing, reviews, deleting, additions, removals, you know, the usuals, before arriving at the finished work.

Version Control is like a system that allows you to know each points you make a change in your work, and saves every new reviews you make, without you losing any part of your work. This will make it easier for you to revert back to an earlier version of your project, if you realize there’s need to.

There are several Version Control Systems, and Git happens to be one of them.

What is Git?

Image source: Gitconnected

Git is one of the most popular Version Control System (VCS). It is a free and high-quality Distributed Version Control System (DVCS) suitable for tracking modifications in source code in software development. So, when you work on a project, this system tracks all the changes made to the code or files you work on.

Git focuses on three key objectives:

  1. Speed.
  2. Data integrity, and
  3. Support for distributed, non-linear workflows.

Git was created in 2005 by Linus Torvalds. It is an open-source system designed to handle everything from small to very large projects with speed and efficiency. Git is used through its Command Line Interface (CLI). The CLI comes pre-installed on MacOS and Linux, and can also be installed on Windows.

Some of Git command lines include “git init” which initializes a repository, “git commit” which saves changes to a repository, “git add” which add files to a repository, and a who lot of other commands. Git is installed locally on the computer.

What is GitHub?

Image source: Simplilearn

GitHub is web-hosting platform for Git repository. GitHub makes it easy for programmers to collaborate and share codes with each other. You can see GitHub as a social networking site for web professionals, but instead of coming together to make TikTok videos, they share codes and collaborate on projects.

GitHub has a Graphical User Interface (GUI) which makes it easy for different parties to use. Unlike Git, GitHub is exclusively cloud-based. On GitHub, when a repository is made public, it can be cloned or forked by anyone. Oops! What’s a clone and fork? A fork is a separate copy of the Git repository that was made, while a clone creates a linked copy that will continue to synchronize with the target repository.

GitHub was created in 2007. It was acquired by Microsoft in 2018.

Key takeaways

Git is installed locally, GitHub is cloud-based. Git allows a developer to track the changes on a project, GitHub is a platform where different developers can collaborate on a project. In simple terms, you can use git without Github, but you cannot use GitHub without Git. Think of Git as a single computer and GitHub as a network of multiple interconnected computers, all with the same end goal but a wildly different role for how to get there.

Now that you understand the difference between Git and GitHub, you can laugh at this meme:

Exit mobile version