A periodical about version control, git, and the future of agentic version control.

Comparison

Git vs GitHub: The Tool and the Place You Host It

Git vs GitHub explained: what each one is, what runs on your machine and what runs on a server, what GitHub adds on top of Git, the other places to host a Git repository, and how coding agents use both.

Version Controls Editors · Updated

The short answer

Git is a version control system: a free, open-source program you install and run on your own machine to record the history of a project, create branches and merge them. GitHub is a hosted service, owned by Microsoft, that stores Git repositories on its servers and adds what a team needs around them: pull requests and code review, issues, permissions, CI/CD with GitHub Actions, and a web interface for browsing code.

They are not alternatives to each other. Git works on its own with no GitHub account at all, and GitHub is built on Git: every repository on it is a Git repository you clone, commit to and push with Git. The real choice is whether you need a shared host for your Git repositories, and if so, whether that host is GitHub or another one such as GitLab, Bitbucket, Azure Repos or a self-hosted Gitea or Forgejo.

Git vs GitHub at a glance

GitGitHub
What it isA distributed version control system: a command-line program.A hosting service for Git repositories, with collaboration tools around them.
Made byCreated by Linus Torvalds in 2005 for Linux kernel development; maintained by an open-source community.A company founded in 2008; acquired by Microsoft in 2018.
Where it runsOn your own computer or server.In the cloud at github.com; GitHub Enterprise Server is a self-hosted edition.
License and costFree and open source (GPLv2).Proprietary service with free and paid plans; check github.com/pricing for current plans.
Needs an accountNo. You only set a name and email that are recorded on each commit.Yes, to push, open pull requests or see private repositories.
Works offlineYes: commit, branch, merge, diff and log all work without a network.No. It is a website and server; you sync with it by pushing and pulling.
Core jobRecords commits, branches, tags and merges in a local repository.Stores a shared copy of the repository that a team pushes to and pulls from.
Code reviewNo pull requests; patches can be shared by email (git format-patch, git send-email) or git request-pull.Pull requests with line comments, required reviews and suggested changes.
Access controlNone of its own; whoever can read the files can read the repository.Per-repository permissions, organizations and teams, protected branches, rulesets and CODEOWNERS.
CI/CD and automationHooks (pre-commit, pre-push, post-receive) run scripts locally or on a server.GitHub Actions runs workflows on pushes, pull requests and other events.
Project trackingNot included.Issues, Projects, Discussions, wikis and releases.
InterfacesThe git command line, plus many GUI clients and editor integrations.The website, the gh command line, GitHub Desktop, mobile apps and a REST and GraphQL API.

What Git is

Git is the program that does version control. Run git init in a folder and it becomes a repository: Git keeps a hidden .git directory holding every commit, which is a snapshot of the project with an author, a timestamp, a message and a pointer to the commit before it. Branches are named pointers to commits, so creating one is instant, and git merge or git rebase brings work from one branch into another.

Git is distributed, which means every clone is a complete repository with the full history. You can commit, branch, read the log and compare versions with no server and no network. Sharing happens by pushing commits to another repository and pulling commits from it, and that other repository can be anywhere: a folder on a shared drive, a server you reach over SSH, or a hosting service such as GitHub.

What GitHub is

GitHub is a place to keep Git repositories that a team, or the public, can reach. When you create a repository on GitHub, it is a Git repository on GitHub's servers; you add it as a remote (usually called origin), push your commits to it, and other people clone it and push their own.

Around that hosted repository GitHub adds the things Git deliberately leaves out: user accounts and permissions, pull requests for proposing and reviewing changes, issues for tracking work, GitHub Actions for running tests and deployments, and a website for reading code and history. It also hosts other things built on the repository, such as GitHub Pages sites, package registries and Codespaces development environments. Check GitHub's documentation for which of these each plan includes.

How Git and GitHub work together

A typical day uses both. You clone a repository from GitHub with git clone, create a branch with git switch -c, make changes and record them with git commit. All of that is Git, on your machine. Then git push sends the branch to GitHub, and you open a pull request there so others can review it, comment on lines and let Actions run the tests. When it is approved, the merge happens on GitHub, and everyone else gets it with git pull.

Some terms belong to one side only. Commit, branch, merge, rebase, tag, remote, push and pull are Git. Pull request, fork (as a button on the website), issue, Actions, star and organization are GitHub. Knowing which is which helps when something goes wrong: a merge conflict is a Git problem you resolve locally or in the web editor, while a blocked merge because a required review is missing is a GitHub rule.

Authentication is where the two meet. GitHub stopped accepting account passwords for Git operations over HTTPS in 2021, so pushing needs an SSH key, a personal access token, or a credential helper such as the one GitHub CLI or Git Credential Manager sets up.

Using Git without GitHub

Plenty of projects use Git with no hosting service. A solo developer can keep a local repository purely for history and undo. A team can share a bare repository (git init --bare) on any server it reaches over SSH. The Linux kernel, the project Git was written for, still takes most contributions as patches sent to mailing lists rather than pull requests.

If you want a host but not GitHub, other services host plain Git repositories too: GitLab and Bitbucket as hosted or self-managed products, Azure Repos inside Azure DevOps, and Gitea or Forgejo as lightweight open-source servers you run yourself. Because the repository is Git on every one of them, moving between hosts keeps the full commit history; what does not move automatically is what the host added, such as pull request discussions, issues and CI configuration. Check each host's import tools for what they carry over.

What changes when coding agents commit

Coding agents use both layers. The Git side is the workspace: an agent clones the repository, works on its own branch or in its own git worktree, and commits as it goes, so its work can be checkpointed, diffed and thrown away without touching anyone else's. Those operations need no host and work the same everywhere.

The host side is where people stay in control. On GitHub an agent's branch becomes a pull request, protected branches and rulesets stop it from pushing straight to main, required reviews and CODEOWNERS decide who must approve, and Actions runs the checks before anything merges. Agent access is usually granted through a GitHub App or a fine-grained token scoped to the repositories it needs. When many agents open pull requests at once, the limits that matter are the host's: API rate limits, Actions concurrency and how reviews are routed. Check GitHub's documentation for the current limits on your plan.

Do you need GitHub, or just Git?

Git on its own is enough if

  • You work alone and want history, branches and undo for your own project.
  • Your team already shares repositories over SSH on a server it runs.
  • Your project reviews changes as emailed patches rather than pull requests.
  • Code must stay on machines you control and you do not want to run a hosting server.

Add GitHub (or another Git host) if

  • Several people or coding agents need one shared copy of the repository to push to.
  • You want changes reviewed in pull requests before they reach the main branch.
  • You want tests and deployments to run automatically on every push or pull request.
  • You want issues, permissions and a web view of your code in the same place as the repository.

Questions people ask

Is GitHub the same as Git?

No. Git is the version control program that runs on your machine. GitHub is a service that hosts Git repositories online and adds collaboration features such as pull requests, issues and GitHub Actions.

Can I use Git without GitHub?

Yes. Git works entirely on its own, and you can share repositories over SSH, through a shared folder or with another host such as GitLab, Bitbucket, Azure Repos, Gitea or Forgejo.

Can I use GitHub without installing Git?

Partly. You can edit files and commit from GitHub's website, and GitHub Desktop includes its own copy of Git. For working with a repository on your computer from the command line, you need Git installed.

Is a pull request a Git feature?

No. Pull requests are a GitHub feature (GitLab calls them merge requests). Git itself has git request-pull, which writes a summary of changes for someone to pull, and git format-patch and git send-email for sharing patches by email.

Who owns Git and who owns GitHub?

Nobody owns Git: it is free, open-source software maintained by a community of contributors. GitHub is a company owned by Microsoft since 2018.

Is GitHub free?

GitHub has a free plan as well as paid plans for teams and enterprises. What each plan includes changes over time, so check github.com/pricing for the current details.

Check the details

Versions and hosting features change. Confirm current behavior in the official documentation:

Comparisons