What is Git & GitHub?

What problem does Git solve?

Imagine writing an essay and saving copies along the way: essay.doc, essay-final.doc, essay-final-REALLY.doc. It works, but it's messy and you can't easily see what changed or go back to a specific version.

Git is a version control system — a tool that takes smart snapshots of your project over time. Each snapshot remembers exactly what changed, who changed it, and why. You can rewind to any snapshot, compare two of them, or try a risky idea on the side without breaking the working version.

main newest
A Git history is a line of snapshots (called commits). The newest is on the right.

So what is GitHub, then?

Git runs on your own computer. GitHub is a website that stores a copy of your Git project in the cloud. Think of it like this:

  • Git = the camera that takes the snapshots (the tool).
  • GitHub = the online photo album you share with others (the host).

GitHub adds the collaboration layer on top of Git: a backup of your code, a place for teammates to work together, code review, issue tracking and automation. GitLab and Bitbucket are popular alternatives that do the same job — they're all just homes for Git projects.

One-line summary: Git tracks the history of your code on your machine; GitHub stores and shares that history online so a team can work on it together.

The words you'll keep hearing

You don't need to memorise these — they'll click as you go — but here's the map:

  • Repository (repo) — a project that Git is tracking.
  • Commit — one saved snapshot, with a short message describing it.
  • Branch — a separate line of work, so you can build a feature without touching the main code.
  • Merge — bringing a branch's changes back into the main line.
  • Push / Pull — sending your commits up to GitHub, or bringing other people's down.
  • Pull request (PR) — a GitHub feature for proposing and reviewing changes before they merge.

How Git thinks: snapshots, not copies

Each time you commit, Git saves a snapshot of your whole project — not a list of edits. Files that didn't change just point back to the previous version, so history stays small and jumping between versions is instant. That snapshot model is why Git is fast and why you can confidently rewind.

Git is also distributed: cloning a project copies its entire history to your computer, not just the latest files. You can commit, branch and browse history with no internet at all — GitHub is only needed when you want to back up or share.

Why bother learning it?

Git is the standard tool on virtually every software team in the world. It lets you experiment fearlessly (you can always go back), collaborate without emailing zip files, and keep a clear record of how a project evolved. The good news: you only need a handful of commands for 95% of daily work — and the next chapters walk you through each one.

Up next: install Git and connect it to VS Code and GitHub, so you're ready to make your first commit.

FAQ

Frequently Asked Questions

Is Git the same as GitHub?
No. Git is the version-control tool that runs on your computer; GitHub is a website that hosts Git repositories online for backup and collaboration. You can use Git on its own with no GitHub account at all.
Is Git free?
Yes — Git is free and open-source. GitHub also has a free tier that includes unlimited public and private repositories for individuals; paid plans only add extra team and organisation features.
Is Git only for programmers?
Mostly, but not strictly. Git tracks any text-based files — code, writing, configuration, notes. It's less suited to large binary files like video or design assets, though Git LFS exists for those.
How long does it take to learn Git?
The everyday basics — commit, branch, push, pull — take an afternoon. You only need a handful of commands for about 95% of daily work; the rest you pick up as you go.