Sitemap
Shweta D

Shweta D

Difference Between Git and GitHub

6 min readSep 6, 2019

Git is a revision control system, a tool to manage your source code history. GitHub is a hosting service forGit repositories. So they are not the same thing: Git isthe tool, GitHub is the service for projects that useGit. To get your code to GitHub, have a look here.

git Vs GitHub

You write your codes and you render it, it runs beautifully. You update your code and suddenly, the code won’t render. Every developer understands this horror of technology not always bending by their rules. Like everything in this world, technology is not perfect and sometimes things are bound to break. Sometimes, codes don’t render or a single typo can result in annihilating hours of hard work and this is where version control helps.

What is Git?

Git

Git is a distributed version control system that allows developers to track changes in their computer files and work in collaboration with other developers. It was created by Linus Torvalds, the creator of Linux, in 2005 for allowing other developers to contribute towards the Linux kernel. It is known for amazing functions such as speed, simple and easy to use design, support for non-linear development, full distribution and ability to handle large projects with efficiency.

Git stands apart from other VCS because of the way it looks at data. While other systems store data as a list of changes made to files, Git, instead, looks at the data in terms of snapshots. Each time a file is modified, it is considered as another snapshot. Git takes a picture of your files and what they look like at the moment and saves a reference to that snapshot.

Benefits of Git

Free and open source — Git is free to use and open source, which means you can download it for free and also make changes to its source code as you see fit.

Fast and small — it performs all of its operations locally, which makes Git fast in terms of operations. It also avoids runtime overheads that are associated with other high-level languages, because it is written in C. And it saves the entire repository in a small file by comprising the file, without losing data quality.

Backup — Git is efficient at keeping backups and there are very rare occasions, where anyone has ever lost data when using Git.

Easier branching — While creating branches in other CVS is a tedious and time consuming task, as it will result in copying all the codes to the new branch. In Git, branch management becomes extremely simple and efficient.

Now, let’s understand what exactly is Github and how does it work with Git.

What is Github?

Press enter or click to view image in full size
GitHub

Github is an online repository that offers all the functions of distributed version control and source code management (SCM) functionality found in Git, as well as adds more. It is commonly used in collaboration with Git and allows developers to save their coding online and then collaborate with other developers on different projects.

Get Shweta D’s stories in your inbox

Join Medium for free to get updates from this writer.

Github also provides access control, plus also collaboration functions such as bug tracking, feature requests, task management, and wikis for every project. The objective of Github, and what it is marketed as, is to simply promote collaborations between developers, allowing them to get a new set of ideas on the project.

The project uploaded on Git can be accessed and manipulated by using the Git command-line interface and Git commands. It offers other features such as Documentation, Pull requests, Commits history, integrations directory, email notifications, Emojis, graphs, nested task lists, @mentioning system similar to Twitter, etc.

What is Version Control?

Version control software allow developers to save any and all changes that are made to their code. So, in case they ever face a scary situation as the one mentioned above, they can simply revert their code back to the state when it was working, instead of spending additional hours finding the small mistake or mistakes that broke the code.

Version control systems also allow multiple developers to work on a single project and save the changes made to ensure that everyone can keep track of what they are working on, allowing simultaneous collaboration.

There are three different types of Version Control Systems (VCS): Local, Centralized and Distributed.

  1. Local Version Control Systems (LVCS):
Press enter or click to view image in full size
Local Version Control Systems

This approach was built on the traditional meaning of sharing, where files were individually copied from each computer into another directory, which may be time-stamped for more control. This form is still popular and distributed with many computers today. The changes are saved in form of patch sets, where the patch sets are dated and time-stamped. So, in case the code breaks, the patch sets can be combined to re-create what the file previously looked like.

2. Centralized Version Control Systems (CVCS):

Press enter or click to view image in full size
Centralized Version Control Systems

Centralized approach was created to solve the problem of collaboration. These systems had a single server that contained all the versioned files, including all the changes made to a file, as well as the clients. They would check out the files from that place, work on it and put in back on that server. However, the major problem with this system was that in case the server corrupts or fails, this would result in loss of all data.

3. Distributed Version Control Systems (DVCS):

Press enter or click to view image in full size
Distributed Version Control Systems

The problem that arose in the centralized version was resolved using this distributed control system, where each client doesn’t just check out the latest snapshot, but rather mirrors the full repository. This means each client has a copy of the entire coding and any changes that are made to it. So, in case of any failure, a backup can be made using any one of the client’s copies. Another benefit of a DVCS is that it allows creating several workflows, which means one client can work on multiple projects at the same time.

Now, that you understand what version control systems are and what they do, as well as the different types of version control systems. Let’s get to understanding what exactly Git is and how it differs from Github.

Git and GitHub are extremely different, but they work together to build better software and projects. Developers have considered both, Git and Github, a boon, as it allows them to work with other developers and saves them hours when it comes to writing and rewriting codes.

If you want to learn both of these awesome technologies, you can check out this amazing Git and Github Essentials course. It will help you learn Git and Github from scratch, including what they are and how to get started with using them in your projects. You will also learn different commands that you can use, as well tips and tricks to make Git and Github more productive.

--

--