Devpuff
Pricing
Log InStart Free
  1. Home
  2. Blog
  3. Git vs GitHub: they are not the same thing
Tools

Git vs GitHub: they are not the same thing

Git vs GitHub: Git is the version control tool on your computer, GitHub is a website that hosts Git repositories. What each one does and how they fit.

By Max Arthur
Co-Founder & Content Marketer·October 28, 2026·7 Min read
White text reading 'Git vs GitHub' on a dark purple dotted background

Git is a version control program that runs on your own computer and records the history of your files. GitHub is a website, owned by Microsoft, that stores copies of Git repositories online and adds collaboration features such as pull requests and issues. You can use Git without GitHub. You cannot really use GitHub without Git.

The short version: Git is the tool, GitHub is one place to keep what the tool produces.

Git GitHub
What it is a command-line program a website and online service
Where it runs on your computer on GitHub's servers
Needs an account no yes
Needs the internet no yes
Created 2005, by Linus Torvalds 2008; owned by Microsoft since 2018
Cost free and open source free tier plus paid plans
Main job track history, branch, merge host repositories, review code, run automation
Alternatives Mercurial, Subversion GitLab, Bitbucket, Codeberg

The confusion is understandable. GitHub is named after Git, most tutorials teach them together, and for many people the first Git command they ever run is git clone with a GitHub URL. But mixing them up causes real problems, from "I can't commit, I'm not logged in" to commits that don't show up on your profile. Everything below was measured with Git 2.50.

Git works with no account and no internet

In a fresh folder with no GitHub account, no remote and no network involved:

git init
git add a.txt
git commit -m "first"
git log --oneline
git remote -v
8a8ca61 first

The commit worked, the history is there, and git remote -v printed nothing at all, because this repository has no connection to anywhere else. Branching, merging, undoing and viewing history all work the same way, entirely offline.

The whole repository lives in a hidden .git folder inside your project. After one commit, it held HEAD, config, index, objects, refs and a few others, 73KB in total. That folder is the repository: every commit, every branch, the complete history. Delete it and the project is just files again. Being outside such a folder is what produces fatal: not a git repository.

Your commit name has nothing to do with your GitHub login

The name and email stamped on each commit come from Git's own settings:

git config --global user.name "Ada Lovelace"
git config --global user.email "ada@example.com"

Git never checks these against anything. GitHub links a commit to your profile by matching that email against the addresses on your account, so if you see commits on GitHub under a name with no avatar, the email in your Git config is not one GitHub knows about. GitHub's docs on setting your commit email address cover the fix.

What GitHub adds on top

Everything GitHub offers is built around repositories that Git already knows how to make. What it adds is the shared, online part:

  • Hosting. An online copy of your repository that is both a backup and the place teammates pull from.
  • Pull requests. A page for proposing changes, discussing them line by line, and merging them after review. Pull requests are a GitHub feature, not a Git command.
  • Issues and projects. Bug tracking and planning boards attached to the repository.
  • Forks. GitHub's name for a copy of someone else's repository under your own account, which is how outsiders contribute to open source.
  • GitHub Actions. Automation that runs tests, builds and deployments when you push.
  • GitHub Pages. Free hosting for static websites straight from a repository.
  • Access control. Who can read, who can push, and who can merge.

GitHub also ships its own command-line tool, gh, for pull requests and issues from the terminal. That is a separate program from git, and it is the one that needs you to log in.

A remote does not have to be GitHub

In Git, a "remote" is any other copy of the repository you can push to and pull from. It can be on GitHub, on GitLab, on a company server, or in a folder on the same machine:

git init --bare shared.git
git remote add origin ../shared.git
git push -u origin main
git clone shared.git friend

After pushing to shared.git, a fresh clone of it into friend had the identical history: 8a8ca61 first. No website was involved. A shared network drive or a USB stick works the same way. GitHub is one remote among many, which is why moving a project from GitHub to GitLab is mostly a matter of changing the remote's URL and pushing.

Git had collaboration before GitHub existed

Git was written in 2005 for the Linux kernel, three years before GitHub launched, and it shipped with its own way to share work: email. The built-in commands are still there:

git format-patch -1
0001-first.patch

That file is an email-formatted patch, starting with a From: line and a Subject: [PATCH] first header. git send-email sends patches, git am applies them, and git request-pull writes a summary asking someone to pull your branch. The Linux kernel, the project Git was built for, still reviews its changes this way rather than with pull requests.

Which commands talk to GitHub

Only a handful of Git commands use the network at all:

Command Talks to the remote?
git clone yes, downloads a copy
git fetch yes, downloads new commits
git pull yes, a fetch followed by a merge
git push yes, uploads your commits
git add, git commit, git branch, git merge, git log, git status no, entirely local

That is why committing works on a plane and pushing does not. It is also why "I committed but my teammate can't see it" is so common: a commit only exists on your machine until you push it. The difference between the two download commands is in git pull vs git fetch.

How they fit together in a normal day

  1. Edit files on your computer.
  2. git add and git commit to record a checkpoint. Git, local.
  3. git push to upload your commits. Git talking to GitHub.
  4. Open a pull request so a teammate can review. GitHub.
  5. Merge the pull request on the website. GitHub.
  6. git pull to bring the merged result back down. Git talking to GitHub.

When something goes wrong at steps 1 to 3, it is a Git problem, and Git's own tools fix it: undoing your last commit, ignoring files, or resolving a merge conflict. At steps 4 and 5, it is a GitHub problem, and the answer is on the website or in its settings.

GitHub alternatives, and why switching is easy

GitHub is the biggest Git host, but not the only one. GitLab offers the same core features and can be installed on your own servers. Bitbucket is common in companies that already use Atlassian's Jira. Codeberg is a non-profit host for open-source projects, and Gitea and Forgejo are lightweight hosts you can run yourself.

Because all of them store ordinary Git repositories, your history is never locked in. Moving a project is two commands:

git remote set-url origin <new-url>
git push -u origin main

Every commit and branch arrives intact, because they lived in your local .git folder all along. What does not move automatically is everything GitHub stores outside the repository: issues, pull request discussions, the history of Actions runs, and stars.

Common questions

Is GitHub free? For public and private repositories, yes. Paid plans add features for teams and organisations. Git itself is free and open source.

Is GitHub Desktop the same as Git? No. It is a graphical app from GitHub that runs Git commands for you and also talks to GitHub's website. VS Code's source control panel does the same job. Under the hood, both are using Git.

Can I use Git without the command line? Yes, through GitHub Desktop, VS Code or another Git client. Learning the commands is still worth it, because every guide and every error message is written in terms of them.

Do you need GitHub to learn Git?

No. Everything that makes Git hard, such as commits, branches, merging and undoing mistakes, happens locally, and learning it without a remote removes a whole category of confusion. Add GitHub when you want a backup, a portfolio, or someone to work with.

Want to learn Git where every command runs in your browser? Start Git Basics.

Keep reading

More from the blog

White text reading 'How to resolve merge conflicts in Git' on a dark purple dotted background
October 29, 2026·8 min readTools

How to resolve merge conflicts in Git

A Git merge conflict happens when two branches change the same lines. How to read the markers, resolve each file, and the check that stops a bad commit.

Read more
White text reading 'Why React lists need unique keys' on a dark purple dotted background
October 16, 2026·7 min readTools

Each child in a list should have a unique key prop

The unique key prop warning in React still renders your list. Here is the bug it predicts, shown with real output from two runs.

Read more
{ }
✦

Ready to write some code?

Put this into practice - start your first free lesson. No setup, no credit card.

Start learning free
Devpuff

Learn to code by doing. One tiny, playful lesson at a time.

Learn
ProgramsCoursesPricing
Company
AboutBlogResourcesAffiliates
Support
Help CenterContactStatus
Programs
Frontend DevelopmentFull-Stack DevelopmentReact DeveloperPython Developer
Courses
Advanced ReactAsync JavaScriptAsync PythonCSS BasicsCSS LayoutDSA Basics
Learn to Code
Learn JavaScriptLearn PythonLearn SQLLearn HTMLLearn CSSLearn ReactBrowse All Topics
Platform Comparisons
Devpuff vs CodecademyDevpuff vs Mimo
© 2026 Devpuff. All rights reserved.Privacy PolicyTerms and ConditionsCookies PolicyRefund Policy
Devpuff vs Sololearn
Devpuff vs freeCodeCamp
Read All Comparisons