Git vs GitHub: What Is the Difference?
Two tools, different jobs
Git is software for managing version history. GitHub is a service that can host Git repositories and provides collaboration features such as discussing issues and reviewing proposed changes. You can use Git without a GitHub account. You can also use another Git hosting service or keep everything local.
Example: where your work lives
This diagram shows a common setup. A repository is where Git stores project history and related information. A remote is another repository that your local repository can communicate with. The arrows describe deliberate exchange, not automatic synchronization.
Your computer: Git repository | share updates (push) vGitHub: hosted repository | retrieve updates (fetch) vYour computer: Git repositoryWhat works without the Internet?
Imagine you are writing a recipe on a train without Wi-Fi. If Git is installed and your repository already exists, you can record changes, read available history and compare recorded versions locally. You do not need to sign in to GitHub for those operations. When you reconnect, you can exchange commits with the hosted repository if you have access and the correct setup. Git calls sending updates to a remote push; retrieving updates is fetch. We will learn these commands later.
A team collaboration example
Your teammate wants to review a change before accepting it. A GitHub pull request (PR) is a proposal to integrate changes, with a place for review and discussion. An issue is a place to track a task or problem. These are GitHub collaboration features, not commands built into Git. A team may have policies that require reviews or checks; we are not assuming any specific plan or settings here.
Avoid confusing saving, committing and sharing
An editor save changes a file on your computer. A Git commit records a selected snapshot in local history. A push can update a remote repository; a commit alone does not upload anything. Practice: classify these tasks as local Git or hosted GitHub work: inspect an old local revision; discuss a GitHub issue; record a local change; request a review on GitHub. Next, learn what a snapshot contains.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Git vs GitHub: What Is the Difference? — knowledge check
Check your understanding of the lesson through practical scenarios.
Which statement correctly distinguishes Git and GitHub?
Which task can you perform locally with Git already installed and a repository present?
Which operation is intended to send updates to a remote repository?
Your teammate proposes a change for discussion before integration. Which GitHub feature is designed for this?
You commit a recipe while offline. What is true about the hosted copy?