🍪 Note: Our web-bootcamp-docs subdomain is a cookie-free zone.
Git/ Github

Git vs. GitHub: A Clear Distinction

Understanding the difference between Git and GitHub is a crucial step for any developer. While the names are similar, they are two separate things that work together to create a powerful workflow.

What is Git?

Git is a version control system (VCS). Think of it as a time machine for your code. It's a free, open-source software that you install locally on your computer.

Git's primary function is to track and manage changes to your project's files. Every time you "commit" a change, Git takes a snapshot of your project. This allows you to:

  • Track history: See exactly who made what change and when.
  • Revert to previous versions: Easily go back to a stable version of your code if something breaks.
  • Work offline: Since Git is on your local machine, you don't need an internet connection to work on your project's history.

In simple terms, Git is the tool that handles the version control logic.

What is GitHub?

GitHub is a cloud-based hosting service for Git repositories. While Git is the tool, GitHub is the platform or the "social network" for your code.

It takes the local version control capabilities of Git and extends them with powerful features for collaboration and project management.

On GitHub, you can:

  • Store your code remotely: Back up your project in the cloud so it's safe and accessible from anywhere.
  • Collaborate with others: Team members can access the same project, propose changes (via pull requests), and review each other's code.
  • Manage projects: Use features like issue tracking, project boards, and wikis to organize your work.

In simple terms, GitHub is the online service that hosts your Git projects and makes collaboration easy.

How They Work Together: The Analogy

You can think of it this way:

  • Git is a notebook: You use it to write and save different drafts of your story (your code). All the drafts are on your local desk.
  • GitHub is a library: It's a central place where you can upload and share your notebooks with other writers. They can read your drafts, suggest edits, and work on their own copies.

You use Git commands on your computer to save your progress (git commit) and you use GitHub's platform to share that progress with your team (git push).