What is the difference between Git and GitHub?
Why Interviewers Ask This
This is a classic screening question for Git & GitHub roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
Git is the version control tool — a command-line program installed on your local machine that tracks changes to files, manages branches, and handles merges. It works entirely locally; you can use Git on a project with no internet connection and no remote server. GitHub is a cloud-based hosting service for Git repositories, owned by Microsoft. It provides a web interface for repositories, adds collaboration features (pull requests, code review, issues, project boards, Actions for CI/CD), and hosts your remote repository so team members can push and pull code. GitHub is NOT Git — it is one of several services built on top of Git. Alternatives to GitHub: GitLab (self-hostable, built-in CI/CD), Bitbucket (Atlassian, integrates with Jira), Gitea (lightweight, self-hosted), Azure DevOps Repos. The analogy: Git is like a word processor (e.g., Microsoft Word), and GitHub is like Google Drive — you use the word processor to create documents, and Google Drive is where you store and share them.
Pro Tip
Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex Git & GitHub answers easy to follow.