What is the difference between Git and GitHub

I am confused with git and git hub. What is difference between them and their real time application?

Git is a revision control system, a tool to manage your source code history. GitHub is a hosting service for Git repositories. So they are not the same thing: Git the tool, GitHub the service for projects that use Git. To get your code to GitHub: have look here : https://help.github.com/articles/create-a-repo

1 Like

sorta like wordpress and wordpress.com - anyone can set up and run their own wordpress site - wordpress.com is a business built around not having to do that - similarly anyone can set up and run their own git server - github.com is the business equivalent of wordpress.com

the basic problem solved by git is distributed file version management - this is needed by programmers to track changes to their program source files and collaborate with others

Im new to this too and its super confusing, but what Ive been able to gather, git is the actual version control system that you use locally to make your repos and commits.

Github is a cloud based service for collaboration, so instead of just having the repos only on your local system, you can upload, or rather push them to Github where others can see and pull the repos to their local system to work on the repos too. Github is not the only cloud based service btw, there are a couple more out there.

So with git, you can push to Github, or any other cloud based service for collaboration, to show people your code, or as backup.

1 Like

Git is the version control software and Github is a website service that hosts documents/repositories tracked by git. Another example of github is bitbucket.
To learn more about the differences and how to use github, Udacity has an excellent free course on github and version control here.

The difference between Git and Github should be clear by reading comments above.

Now let’s see where you use it.

Consider you have a directory with a file named Progress.txt.

You initialize git in that directory using git init.

on Day 1: You will write something as shown below to Progress.txt, then run git add Progress.txt and git commit -m 'Day 1 Progress'

// Progress.txt
Day 1: Learned Code Comments

On Day 2: You will add the file again to the staging area and commit it like before.

// Progress.txt
Day 1: Learned Code Comments from mdn.com
Day 2: Created my first ever HTML file with the help of codepen.io.

So on and so forth, you did this for one month.

Suddenly one of your mentors comes and asks about your progress this month, you happily show the Progress.txt and the mentor is satisfied. You also show this file to your friends and they are really glad that you are working so hard, but while showing it to your parents, they express doubt that you might have filled the Progress.txt file in one go just to show them.

Thank god you used Git to track your progress. You immediately run git log --online to show them your commit history, but ENOUGH IS ENOUGH! You decide that you’ll use Github to share your progress with others.

You immediately create an Account and create a repository named progress. Then from inside your local directory, you execute git remote add origin https://github.com\/<yourusername\>\/progress.git and git push -u origin master and your code is published on Github for everyone to see. You also link this file to your website for everyone to see.

Now everyone can view your progress and see that you work every day and push your progress to GitHub. Your mentor can just look at it to know how you are doing and your parents are happy looking at your commit history on GitHub.

Its :clock430: 4:30 AM now, So if you still haven’t got the gist of What git and GitHub is all about?, I will complete this answer tomorrow

1 Like

Git is a version control system - GitHub is a website that hosts Git Repos and makes collaboration easier for open source projects.

Another example for a hosting server for Git repositories is Bitbucket which also uses Git the tool and hosts private repositories. :slight_smile:


If you’re working solo on your project, and don’t need to share your files/source code with anyone else, you can install git on your computer and have all the advantages of source control.

The wrinkle is if you need to collaborate with another person. You can give that person access to the project directory on your computer but that becomes complex real fast when you need to factor in security, 24/7 uptime of your computer so your collaborator can access it at any time, touting and firewall setup to give outsiders access to your personal computer. Or maybe it’s not jus possible if the said computer is also your laptop that you have to take with you.

That’s where github comes in… Github can host the same project files so you, your friend, and possibly other collaborators ACB all work on the same project.

Bottom line, you don’t have to sign up to github to use git if it’s only you working. But even for a solo developer, github may still be useful as it provides you with a remote copy/backup of your project… in case something happens to your hard drive or your laptop stolen etc.