Skip to content
MintFlow Articles

Git vs GitHub: what is the difference?

Git records your project's history and GitHub hosts it online. How they fit together, what GitHub costs and which to learn first

On this page
  1. Git vs GitHub at a glance
  2. What is Git?
  3. What is GitHub?
  4. How do Git and GitHub work together?
  5. Can you use Git without GitHub?
  6. Can you use GitHub without Git?
  7. How much do Git and GitHub cost?
  8. What are the alternatives to GitHub?
  9. How do you start using Git and GitHub?
  10. 1. Install Git
  11. 2. Tell Git who you are
  12. 3. Make your first commit
  13. 4. Put it on GitHub
  14. 5. Lock down the account
  15. What mistakes do beginners make?
  16. What's changing in Git 3.0?
  17. Frequently asked questions

Git is a free program that records the history of your files on your own computer. GitHub is a website, owned by Microsoft, that stores Git projects online and adds tools for working on them with other people. That's the whole Git vs GitHub question in two sentences: one is the tool, the other is a place to put what the tool makes.

You can use Git without ever opening a GitHub account. You can also use GitHub in a browser without installing Git, up to a point. Plenty of developers use both, and if you're learning to code you probably will too.

Git vs GitHub at a glance

Git GitHub
What it is A version control program A hosting and collaboration website for Git projects
Where it runs On your computer On GitHub's servers, used through a browser, an app or Git itself
Who's behind it An open source project, started in 2005 by the Linux community and Linus Torvalds A company Microsoft bought in 2018
Price Free Free plan, with paid plans from $4 a month
Account needed No Yes, to create repositories or contribute
Works offline Yes, for nearly everything No
Main job Commits, branches, merges, history Pull requests, issues, code review, automation, access control
Alternatives Subversion, Perforce GitLab, Bitbucket, Codeberg

What is Git?

Git is a distributed version control system. It saves snapshots of your project, called commits, so you can see what changed, go back to an earlier version, or try an idea without breaking the version that works.

The Linux kernel community built it in 2005, with Linus Torvalds in the lead, after the proprietary system they had been using, BitKeeper, stopped being free for them. Git is released under version 2 of the GNU General Public License, so it costs nothing to use at home or at work.

Three ideas explain most of how it behaves:

  • Snapshots. Each commit records what every file in the project looked like at that moment. Files that haven't changed are linked to the earlier copy, not stored again.
  • Local first. The history lives on your disk, so you can commit, compare versions and browse old work on a plane. You only need a connection to share.
  • Three stages. A file is modified (you changed it), staged (you picked it for the next snapshot) or committed (it's saved in the history). That middle step confuses most beginners. It exists so you can choose exactly what goes into each commit.

Git is close to universal. In Stack Overflow's 2022 developer survey, 96.65% of professional developers used it, against 5.96% for second-placed Subversion, DevClass reported. Git's own site still cites that survey.

What is GitHub?

GitHub is a platform that hosts Git repositories (a repository, or repo, is a project folder plus its history) and wraps them in tools that Git doesn't have. GitHub's documentation says the service is based on Git.

What GitHub adds:

  • Pull requests. A page where you propose a change, others see the differences and comment, automated checks run, and someone merges it. This is GitHub's main collaboration feature.
  • Issues and planning. Bug reports, to-do items and milestones attached to the project.
  • Forks. Your own copy of someone else's repository, which stays connected to the original. It's how strangers contribute to open source projects they can't edit directly.
  • GitHub Actions. Automation that can test or publish your code when something happens in the repo.
  • Access control. Public repositories are visible to everyone on the internet. Private ones are limited to you, people you invite and certain members of your organization.

Microsoft announced the deal in June 2018 for $7.5 billion in stock and completed it that October. GitHub's Octoverse report, published on 28 October 2026, counts more than 225 million developers on the platform. It also says over 40% of pull requests in September 2026 were started by AI agents, up from 17% in March. So if you build apps by prompting an AI, knowing how to read a commit and undo one is a good safety net.

How do Git and GitHub work together?

Git does the recording. GitHub holds a shared copy, which Git calls a remote. Here's the usual loop:

  1. You clone a repository, which downloads the files and, by default, the full history.
  2. You create a branch, a separate line of work that leaves the main version alone.
  3. You edit files and commit the changes on your computer. Nothing has gone online yet.
  4. You push the branch to GitHub.
  5. You open a pull request on GitHub, and teammates review it.
  6. Someone merges it, and everyone else pulls the new version.

Steps 1 to 4 are Git commands. Step 5 happens on GitHub. Step 6 is a bit of both.

That split also clears up a common mix-up. git pull is a Git command that fetches new commits and adds them to your current branch. A pull request is a GitHub feature. The names are similar, but they do different things.

Can you use Git without GitHub?

Yes. Git never requires an account. You can track a novel, a thesis or a folder of scripts on one laptop and never connect it to anything. If you want a second copy or a teammate, a Git remote can be a folder on a shared drive, your own server over SSH or any hosting service.

The catch is backup. If the only copy is on your laptop and the laptop dies, the history goes with it. Push to a remote somewhere, even a private one.

Can you use GitHub without Git?

For small jobs, yes. GitHub's own Hello World tutorial says you don't need to code, use the command line or install Git. You create a repository, make a branch, edit the README, open a pull request and merge it, all in the browser.

It stops being practical once you need to run the code or edit many files at once. Uploads through the browser are also limited to 25 MiB per file.

There's a middle option. GitHub Desktop is a free, open source app for Windows and macOS that handles Git work with buttons instead of commands. Linux isn't officially supported. Many code editors have Git controls too, and our guide to the best code editors compares the main ones.

How much do Git and GitHub cost?

Git is free, with no paid version. GitHub has a free plan that's enough for learning, personal projects and plenty of small teams.

Plan Price Actions compute per month Packages storage Codespaces per month
Free $0 $12 (about 2,000 minutes) 500 MB 120 core hours, 15 GB (personal accounts)
Pro (personal) $4 a month (unconfirmed, see note) $18 (about 3,000 minutes) 2 GB 180 core hours, 20 GB
Team $4 per user a month $18 (about 3,000 minutes) 2 GB No free quota
Enterprise $21 per user a month $300 (about 50,000 minutes) 50 GB No free quota

Some notes on that table:

  • Minutes or dollars? GitHub's pricing page still lists Actions minutes, while its billing documentation now gives a dollar allowance. They match at the standard Linux rate of $0.006 a minute. Windows ($0.010) and macOS ($0.062) runners use up the allowance faster. Standard runners are free for public repositories.
  • The Pro price. GitHub's pricing page doesn't show Pro, and its documentation doesn't state the price. GitHub cut it to $4 a month in April 2020, and third-party price guides updated in 2026, including Capital & Compute's and SoftVerdict's, still list $4. We couldn't confirm it on a current GitHub page, so read the charge on the upgrade page's review step before you confirm.
  • Private repositories are free. Since April 2020, every account gets unlimited private repositories with unlimited collaborators.
  • What paying gets you. Pro and Team add controls for private repositories, such as protected branches, required reviewers and code owners, plus wikis and email support. Team is for organizations, Pro for one person.
  • Copilot is mostly separate. GitHub's AI assistant has its own subscriptions and a free tier, and our guide to GitHub Copilot plans covers the prices. Since 28 October 2026, GitHub Enterprise Cloud customers with a GitHub or Microsoft account team can get access with no seat charge, but AI usage is billed from the first request.

Codespaces are development computers that run in GitHub's cloud. As a beginner, you can ignore them.

Our take: start on Free. Pay for Pro only when you want branch protection on a private repo, and for Team when several people need the same rules.

What are the alternatives to GitHub?

Because your history belongs to Git, you can move a repository to another host without losing commits. Issues, pull requests and other GitHub extras are a different matter, since they live on the platform and not in Git.

  • GitLab. Free for up to five users in a private top-level group, with 400 compute minutes a month and 10 GiB of storage per project. GitLab asks for card details before you can use its shared runners. Premium is $29 per user a month, billed annually. You can also run GitLab on your own server.
  • Bitbucket. Atlassian's host is free for up to five users, with 50 build minutes a month. It makes most sense if your team already uses Atlassian's tools.
  • Codeberg. A free host run by a Berlin non-profit on Forgejo, for free and open source projects. Its FAQ allows people who contribute to free software up to 100 MB of private content, and it doesn't offer private hosting for commercial projects.

For a first project, we'd still pick GitHub. Its free plan has no cap on collaborators, and its beginner documentation is good.

How do you start using Git and GitHub?

This is the shortest route from nothing to a project online.

1. Install Git

System Command Note
Windows winget install --id Git.Git -e --source winget Or use the installer from git-scm.com. The Git for Windows project doesn't maintain the winget package
macOS brew install git Needs Homebrew. xcode-select --install gets Apple's copy
Debian or Ubuntu sudo apt-get install git Run sudo apt-get update first. May be older than the current release
Fedora sudo dnf install git

Open a new terminal window and run git --version to check it worked.

2. Tell Git who you are

Git stamps this name and email on every commit, so anyone who can see the repository can see them. To keep your address private, use the noreply address from your GitHub email settings instead.

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main

The third line names the first branch of each new repository main, which is also what GitHub's instructions use. Without it, Git 2.56 calls it master.

3. Make your first commit

Open a terminal in your project folder, not your home folder, because git add . stages everything inside the folder you're in. Start with:

git init
git status -uall

The second command lists every file Git has found, and -uall makes it look inside subfolders too. If you see passwords, API keys or anything else that shouldn't be shared, put those file names in a text file called .gitignore in the same folder before you go on. Then run:

git add .
git commit -m "First commit"

You now have version control, and GitHub hasn't been involved at all.

4. Put it on GitHub

Create an account, then a new repository. Leave the README, license and gitignore options off, because GitHub's documentation says to skip them to avoid errors. If you're offered a hash algorithm, keep the default, SHA-1, because it has to match the repository you just made. Copy the repository's URL and run:

git remote add origin REMOTE-URL
git push -u origin main

Replace REMOTE-URL with the address you copied. If the push fails because Git can't find main, run git branch to see your branch's name and use that instead.

If Git asks for a password, your GitHub password won't work, because GitHub removed password sign-in for Git. Use a personal access token, a credential helper such as Git Credential Manager, or an SSH key.

5. Lock down the account

GitHub requires two-factor authentication for some contributors, including people who create a release or own an organization that contains repositories or other users. Turn it on even if you aren't asked. Our guide shows how to set up two-factor authentication with an authenticator app.

What mistakes do beginners make?

  • Committing secrets. Never commit passwords or API keys. If you've already pushed one, GitHub says to revoke or rotate it first, before you worry about cleaning up the history.
  • Thinking a commit is a backup. A commit stays on your computer until you push it.
  • Pushing huge files. GitHub warns you above 50 MiB and blocks files over 100 MiB. Git Large File Storage exists for those.
  • Choosing public by accident. Check the visibility setting when you create a repository. Anyone on the internet can read a public one.

What's changing in Git 3.0?

Nothing you need to wait for. The next release skips from 2.56 to 2.98, and that isn't a typo. The Git project tagged a test version, 2.98.0-rc0, on 30 November 2026, and its draft release notes describe 2.98 as preparation for Git 3.0. LWN and GitLab both report that the finished version is planned for December, with 2.99 and 3.0 following together in spring 2027 (LWN says April). The project's own list of breaking changes still says 3.0 has no planned release date.

For beginners, the visible change is that new repositories will start on main by default. New ones will also use SHA-256 in place of SHA-1 for the IDs Git gives each commit. The project has no plan to deprecate SHA-1, so existing repositories will keep working.

GitHub's documentation now lists SHA-256 repositories as a public preview that you choose when you create a repository. You can't switch a repository's algorithm afterwards, and Git can't push or fetch between the two kinds. For a first project, we'd stay on SHA-1.

Frequently asked questions

Is Git the same as GitHub?

No. Git is a free version control program that runs on your computer. GitHub is a website owned by Microsoft that hosts Git projects and adds collaboration tools.

Do I need GitHub to use Git?

No. Git works entirely on your own computer without an account. GitHub is useful when you want an online copy or want to work with other people.

Should I learn Git or GitHub first?

Learn the Git basics first: commit, branch, merge, push and pull. GitHub makes more sense once you know what a commit and a branch are. If you'd rather not use a terminal yet, GitHub's browser tutorial teaches the same ideas.

Is GitHub free?

Yes. The Free plan includes unlimited public and private repositories with unlimited collaborators. Team costs $4 per user a month and Enterprise $21 per user a month.

Who owns Git and GitHub?

Microsoft has owned GitHub since October 2018. Git is an open source project under the GPLv2 license and a member of the Software Freedom Conservancy, and Microsoft doesn't own it.

What is the latest version of Git?

Git 2.56.1 is the latest stable release on git-scm.com as of 3 December 2026. Git for Windows offers it as 2.56.1(2), released on 30 November 2026. Git 2.98.0-rc0, tagged the same day, is a test version.

Sources

Was this helpful?

Keep reading

Two screens of code side by side behind a keyboard, for a comparison of Cursor vs Copilot
AI Coding Tools
AI & Dev Tools

Cursor vs Copilot: Grok Build (formerly Cursor) or GitHub Copilot?

Cursor vs Copilot in December 2026: what each plan costs, why the same Claude tokens cost you more in Cursor, what the Grok Build rename changes and which one to pick.

17 min read

GitHub's Octocat figurine in front of a monitor, for a guide to GitHub Copilot plans
AI Coding Tools
AI & Dev Tools

GitHub Copilot plans explained: Free, Pro, Pro+, Max, Business and Enterprise prices and AI credits

Every GitHub Copilot plan in December 2026, from Free and Student to Pro, Pro+, Max, Business and Enterprise: prices, AI credits, models and what happened to premium requests.

19 min read

Man on a video call at his desk with a notebook beside the laptop, where the best AI meeting assistant takes the notes
Best AI Tools
AI & Dev Tools

Best AI meeting assistant in 2026: Fathom, Granola, Otter, Fireflies and the built-in options compared

The best AI meeting assistants in December 2026: Fathom, Granola, Otter, Fireflies and the AI in Zoom, Teams and Meet compared on price, free limits, bots and consent.

24 min read