Side by side
GitvsGitHub
What is the difference between Git and GitHub?
Updated 2 min read6 differences
In short
Git is a version control tool that keeps your code's history on your computer, while GitHub hosts Git repositories online and adds pull requests, issues and CI.
Git
Git is a free, open-source distributed version control system that tracks changes to files over time, so developers can collaborate and undo mistakes.
Read the page on GitGitHub
GitHub is a platform for hosting Git repositories and working on code together, with pull requests, code review, issues and the largest open-source community.
Read the page on GitHubGit and GitHub compared
| Aspect | Git | GitHub |
|---|---|---|
| What it is | A version control tool | A hosting and collaboration platform |
| Where it runs | On your computer | In the cloud, in a browser |
| Needs internet | No | Yes |
| Made by | Linus Torvalds and the Git community, open source | GitHub Inc., part of Microsoft |
| Main features | Commits, branches, merges, history | Pull requests, issues, Actions, code review |
| Alternatives | Mercurial, SVN | GitLab, Bitbucket, Gitea |
The difference, explained
Git was created by Linus Torvalds in 2005 to manage the Linux kernel. It is free, open-source software that runs locally: it tracks changes in commits, manages branches, merges work and keeps the complete history in a .git folder. It works fully offline and doesn't need any server or company.
GitHub, launched in 2008 and owned by Microsoft since 2018, is a service built around Git. It stores repositories online so teams can share them, and adds what Git itself doesn't have: pull requests with code review, issues, project boards, GitHub Actions for CI/CD, security alerts, a package registry and a huge open-source community.
You use them together: git commit records work on your machine, and git push uploads it to GitHub, where teammates review and merge it. GitHub is one of several hosting platforms; GitLab, Bitbucket and self-hosted servers such as Gitea work with the same Git commands.
A common misconception is that GitHub is required to use Git, or that Git is a GitHub product. Git works entirely without GitHub, and a repository can move between hosting services or be mirrored to several at once, because the history lives in Git itself.
Which one should you use?
Choose Git when…
- You need to track changes to code on your own machine.
- You want to work offline or on a private server.
- You are learning version control itself.
Choose GitHub when…
- You want to share code and collaborate through pull requests.
- You need hosted CI/CD, issue tracking or code review.
- You want to publish open source or join an existing project.
Readers ask
Can I use Git without GitHub?
Yes. Git works fully on its own computer, and you can also host repositories on GitLab, Bitbucket or your own server.
Is GitHub free?
GitHub has a free plan with unlimited public and private repositories and a monthly allowance of Actions minutes. Paid plans add features for teams and companies.
What is the difference between GitHub and GitLab?
Both host Git repositories with code review and CI/CD. GitHub has the largest community; GitLab bundles more DevOps features into one product and is often self-hosted.