Build the mental model
Git and GitHub sound similar, but they solve different problems. Git is a version control tool that runs entirely on your own computer — the same git init, git add, git commit, git branch, and git merge commands you already used in the Git tutorial work perfectly with no internet connection at all.
GitHub, on the other hand, is a company's product: a website and set of servers built on top of Git that host your repositories in the cloud and add an entire collaboration layer Git itself knows nothing about.
- Pull requests and code review
- Issue tracking
- GitHub Actions for automation
- Releases for shipping software
Git does not require GitHub to be useful. You could work solo on a laptop forever, never push anywhere, and Git would track every commit perfectly. GitHub becomes valuable the moment more than one person needs to work on the same codebase, because it gives everyone a shared, always-available copy of the repository plus tools for discussing and reviewing changes before they land.
Alternatives to GitHub
GitHub is not the only choice — GitLab and Bitbucket are direct competitors offering nearly the same hosting-plus-collaboration model, and many companies run their own private Git servers instead.
Choosing GitHub over these alternatives is a hosting decision, not a Git decision — the underlying version control commands stay identical no matter which one you push to. This lesson is the bridge: everything from here on assumes you are comfortable with local Git and are now ready to add the platform layer on top of it.
- Git
- A free, open-source tool that tracks changes to files over time entirely on your local machine, with no server required.
- GitHub
- A company and website that hosts Git repositories in the cloud and adds collaboration tools like pull requests, issues, and Actions on top of Git.
- Version Control
- A system for recording changes to files over time so you can review history, compare versions, and revert to an earlier state when needed.
GIT VS GITHUB
-------------
YOUR COMPUTER (local) GITHUB.COM (hosted platform)
--------------------- -----------------------------
Git: init, add, commit Repository hosting
branch, merge, log + Pull Requests + Issues
+ Actions (CI/CD) + Releases
|---------- push ----------------------->|
|<--------- fetch / pull -----------------|
Git works alone. GitHub is a platform built ON TOP of Git.Connect it to a real scenario
Before moving on, confirm your local setup still works the way the Git tutorial left it.
Check your Git version
Run git --version — GitHub's newer features sometimes need a reasonably recent one.
Check your identity
Check git config --get user.name and user.email — this is the identity Git stamps on every commit. If either prints nothing, set it with git config --global before continuing.
Look at the remote link
git remote -v shows the link between your local folder and its GitHub-hosted copy — a URL ending in .git.
That single line is the entire bridge between the local Git you already know and the GitHub platform this tutorial is about to open up. Nothing about your local workflow changes — GitHub simply gives that remote a home other people can also reach.
Try the working example
git --version
git config --get user.name
git config --get user.email
git remote -v
git remote add origin https://github.com/yourname/example-repo.git
git remote -vgit --version -> git version 2.53.0.windows.2 (yours may differ slightly)
git config --get user.name -> Thuta Learner
git config --get user.email -> learner@example.com
git remote -v (before adding one) -> prints nothing
git remote -v (after git remote add origin ...) ->
origin https://github.com/yourname/example-repo.git (fetch)
origin https://github.com/yourname/example-repo.git (push)5-minute try-it
In a real project you've cloned from GitHub, run git remote -v and identify whether the URL uses HTTPS or SSH. Then run git config --get user.name and user.email and confirm they match the identity you want attached to your commits on GitHub.
One important caution
Assuming GitHub IS Git — thinking commands like fork or pull request are things Git itself understands, when they're GitHub-specific concepts layered on top
Forgetting to set git config user.name/user.email locally, so commits get attributed to a generic or wrong identity once pushed to GitHub
GitHub Docs: About Git — Git & GitHub