Git vs GitHub: What’s the Difference?
People mix these up because the names are similar. They’re different layers:
| Git | GitHub | |
|---|---|---|
| Type | Version control software | Web platform (hosting + collaboration) |
| Where it runs | Your computer (locally) | Cloud / web |
| Core job | Track snapshots + history; merge/rebase/branch | PRs, issues, CI/CD, reviews |

Mental model
- Use Git to manage the history of your code.
- Use GitHub to share that history with other humans (and automate checks).
The relationship in 4 steps
- Initialize a repo locally with
git init. - Create commits locally with
git commit. - Add a remote pointing to GitHub with
git remote add origin .... - Push commits with
git pushand collaborate via PRs.
Copy/paste: connect to GitHub
git remote add origin https://github.com/<you>/<repo>.git git branch -M main git push -u origin main
When you’re ready to go all-in on collaboration, continue with: