What is Git?
Git records project history as local snapshots you can browse offline; GitHub is optional hosting.
Published here · 2 sources · Resume reading
Git is a distributed version control system: it records your project's history as commits on your machine, and a remote host is optional. Pro Git's core picture is that Git stores a series of snapshots of a miniature filesystem, not a simple chain of per-file change lists like classic delta-based tools [1]. GitHub Docs split the product names cleanly: Git is the tool; a repository holds files plus revision history; platforms like GitHub add hosting and collaboration [2].
Make two local commits with no remote
You can prove the local-first model in a throwaway folder. No GitHub account and no git remote are required [1] [2].
mkdir -p /tmp/git-demo-fbd && cd /tmp/git-demo-fbd
git init -q
printf 'hello\n' > README.md
git add README.md
git commit -q -m "first"
printf 'world\n' >> README.md
git add README.md
git commit -q -m "second"
git log --oneline
git show HEAD:README.mdYou should see two short hashes with the messages second then first, and git show should print hello then world (the file at the latest commit). git commit saves a snapshot after git add stages changes [2].
Treat each commit as a project photo
Older version-control tools often stored lists of changes per file. Pro Git says Git does not think of its data that way. Each commit is a picture of all tracked files at that moment. If a file did not change, Git stores a link to the previous identical copy instead of copying every byte again [1]. That is why "Git only stores diffs" is the wrong mental model, even though git diff and git log -p can still show differences when you ask.
The usual path for a change is working tree to staging area to the Git directory (the object database): modified, staged, then committed [1]. Most day-to-day Git work needs only local files [1].
cd /tmp/git-demo-fbd
echo extra >> README.md
git status -s
git diff README.mdYou should see a modified README.md in the short status, and a diff that adds extra. The last commit snapshot is unchanged until you git add and git commit again.
Separate Git from GitHub
GitHub Docs call Git the most popular distributed version control system and describe repositories as files plus commit history. Through platforms like GitHub, teams get transparency and collaboration: hosting, issues, pull requests, and a web UI [2]. None of that is required to learn the snapshot model. Keep remotes for sharing; keep Git for history on disk.
When you need undo paths after this glossary page, use The Git undo cheat sheet, force-with-lease instead of bare force-push, and hide formatting noise from blame. For everyday config tweaks, see five Git config lines. When two branches need integrating, read Git rebase vs merge before rewriting shared history.
Send this to the friend who thinks Git and GitHub are the same thing.


Keep this guide
Filed under Dev explainers, Dev tools
Questions about this guide
Does Git only store diffs between versions?
No. Pro Git's model is a series of snapshots of the whole project. Unchanged files reuse prior storage by link. Diffs are something you can compute when you look at history.
Do I need a GitHub account to use Git?
No. Git runs fully on your machine. GitHub hosts Git repositories and adds collaboration features. You can demo Git with no remote at all.
What are the three states of a change?
Modified in the working tree, staged with git add, then committed into the local object database. Pro Git documents that path as working tree to staging area to Git directory.
Sources
- GitHub Docs: About Git, accessed 2026-11-14docs.github.com