Git vs GitHub
One is the version-control engine on your laptop; the other is the social cloud built around it.
Git is a distributed version-control tool that runs entirely on your machine — it tracks commits, branches and merges with no network required. GitHub is a cloud platform that hosts Git repositories and layers collaboration on top: pull requests, issues, code review, CI/CD and a social layer. Git works fine without GitHub; GitHub is worthless without Git.
Two different kinds of thing
The confusion is a category error: Git is a piece of software you run, while GitHub is a website you log into. Git does the version control; GitHub hosts the result and wraps services around it. Every difference below flows from that one distinction between a local tool and a cloud platform.
Version control lives in Git
Git is the engine that actually tracks your code: it records commits, creates and merges branches, and stores the entire history in a hidden .git folder in your project. All of this is Git's job and Git's alone. GitHub does not do version control — it stores repositories that Git has already versioned.
Git works fully offline
Because Git is distributed, every clone is a complete repository with the full history, so you can commit, branch, diff and roll back on a plane with no connection. Nothing requires a server. GitHub, by contrast, is a cloud service — you only touch it when you push, pull or open a pull request, and it needs the network.
GitHub adds collaboration
GitHub's real value is the team layer Git lacks: a shared remote everyone pushes to, pull requests that turn a merge into a reviewable proposal, inline code review, issues for tracking work, and fine-grained access control. This is what turns a solo version-control tool into a workflow many people can share safely.
GitHub adds automation and a social layer
On top of collaboration, GitHub piles on things Git never imagined: Actions for CI/CD that build and test every push, stars and followers, discussions, project boards, and a public profile that has become a developer's portfolio. None of this is version control — it's the ecosystem. Remember GitHub is optional: GitLab, Bitbucket or a bare server work with the same Git underneath.
A category error, cleared up
The single most common beginner confusion in software tooling is treating "Git" and "GitHub" as synonyms. They are not even the same kind of thing. Git is a piece of software — a version-control tool you install and run on your own machine. GitHub is a website and cloud service that hosts Git repositories and builds a whole collaboration platform around them. Git is the noun; GitHub is a place that stores those nouns and offers services on top.
The relationship is one of dependency, not equivalence: GitHub is built on Git and would be pointless without it, while Git is completely independent and works perfectly with no GitHub at all. Once you internalise "Git = the tool, GitHub = a host for the tool," every other distinction becomes obvious.
What Git actually is
Git is a distributed version-control system, created by Linus Torvalds in 2005 to manage the Linux kernel. Its job is to track changes to files over time so you can see history, compare versions, branch off to try things, and merge work back together. It does all of this locally: when you run git init or git clone, Git creates a hidden .git directory that holds the complete history of the project as a chain of commits — immutable snapshots, each pointing to its parent.
The word "distributed" is the crucial one. Unlike older centralised systems, every clone of a Git repository is a full, independent copy of the entire history, not just the latest files. That means you can commit, create and switch branches, diff any two points in time, and roll back — all with no network connection whatsoever. A server is optional; Git's model is that every developer already holds the whole repository. This local-first, branch-cheap design is why Git won, and it is entirely separate from where, if anywhere, you choose to host a shared copy.
What GitHub adds on top
If Git already does version control, why does GitHub exist? Because coordinating a *team* around a shared Git repository needs infrastructure Git itself does not provide. GitHub supplies a central remote that everyone pushes to and pulls from, plus a layer of collaboration features:
- Pull requests — the signature feature: a proposal to merge one branch into another that others can review, comment on line-by-line, and approve before it lands. Git can merge branches, but it has no notion of a reviewable, discussable proposal.
- Issues and project boards — bug tracking and task management tied directly to the code.
- Code review and access control — inline comments, required approvals, and fine-grained permissions over who can read or write.
On top of collaboration, GitHub layers automation and community: GitHub Actions runs CI/CD pipelines that build and test every push, and a social layer of stars, followers, discussions and public profiles has turned a GitHub account into a de facto developer portfolio. None of that is version control — it is the ecosystem wrapped around Git.
Git without GitHub, and GitHub's rivals
A clarifying exercise: everything on the Git side of the ledger works with no GitHub account at all. You can create a repository, commit for years, branch and merge, and maintain a complete history entirely offline. You can even collaborate without GitHub — teams can push to a bare repository on any server they control, or use git over SSH directly between machines.
And GitHub is only one host among several. GitLab, Bitbucket, and self-hosted options like Gitea all offer the same core idea — a cloud home for Git repositories plus collaboration tooling — with different feature sets and pricing. They all speak the same underlying Git protocol, which is exactly why you can move a repository between them freely. GitHub's dominance is a matter of network effects and polish, not technical lock-in. This is worth remembering precisely because the two names are so fused in people's minds that they forget the tool is portable.
How they fit together in practice
In a normal day the division of labour is seamless. You do your version control with Git, locally: edit files, stage them, commit, create a feature branch, and iterate — none of which needs the internet. When you are ready to share, you git push to GitHub, which stores your branch on the shared remote. There you open a pull request, teammates review it, GitHub Actions runs the tests automatically, and once it is approved you merge it into the main branch — after which everyone git pulls the update back down with Git.
So the mental model is a clean split: Git is the engine doing the actual work of tracking and combining changes, and GitHub is the platform that hosts the shared copy and provides the review, automation and coordination a team needs around that engine. Knowing which layer owns which responsibility is what lets you debug problems correctly — a merge conflict is a Git matter you resolve locally, while a broken required-check or a permissions error is a GitHub matter you fix in the platform.
Git is a tool (software you install); GitHub is a service (a website that hosts Git repos).
Git is distributed and local — you can commit, branch and view full history with no internet connection.
GitHub adds a hosted remote plus collaboration: pull requests, code review, issues, and access control.
GitHub bolts on automation and social features Git has no concept of — Actions (CI/CD), stars, discussions.
Git is created by Linus Torvalds and open; GitHub is one of several hosts (alongside GitLab, Bitbucket).
You can use Git with no host at all, or with any host — GitHub is a popular choice, not a requirement.
Quick quiz
Which statement is correct?
What can you do with Git but NOT with GitHub alone?
Git branching workflows
The commit-to-merge loop every team runs — and the branching models that shape it.
How git reset works
One command, three trees, and the difference between undo and disaster.
CI/CD pipeline explained
Turn every commit into a tested, shippable, deployable artifact — automatically.
Versioning strategies
Version numbers are a contract — here's how to make them mean something.