# What is Git?

> Git records project history as local snapshots you can browse offline; GitHub is optional hosting.

Source: https://fullbytedeveloper.com/blog/what-is-git
Published here: 2026-11-17

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].

```bash
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.md
```

You 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].

```bash
cd /tmp/git-demo-fbd
echo extra >> README.md
git status -s
git diff README.md
```

You 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](/blog/undo-sheet), [force-with-lease instead of bare force-push](/blog/force-lease), and [hide formatting noise from blame](/blog/blame-ignore). For everyday config tweaks, see [five Git config lines](/blog/git-config). When two branches need integrating, read [Git rebase vs merge](/blog/git-rebase-vs-merge) before rewriting shared history.

Send this to the friend who thinks Git and GitHub are the same thing.

Image: A three-commit timeline from a local Git demo with Git 2.47.3 on 12 Nov 2026, with no GitHub remote. Commit 1, 14ccebc first, shows README.md containing hello. Commit 2, a4dbb45 second, shows hello and world. Commit 3, 6903867 third, shows hello, world, and again. Arrows connect the snapshots. A footnote quotes Pro Git 1.3: Git thinks of its data as a series of snapshots of a miniature filesystem, and unchanged files are stored as a link to the previous copy.
https://fullbytedeveloper.com/media/what-is-git/snapshot-timeline.webp
Each commit is a save of the whole project at that moment, not a loose list of diffs. This demo never left the local machine.

Image: Two cards comparing Git and GitHub. Git is a distributed version control system that lives on your machine, works offline with no account, and records commits with git init, git add, git commit, and git log. GitHub is a platform that hosts Git repositories and adds issues, pull requests, and a web UI. It is optional and not required to use Git. Sources: GitHub Docs, About Git, and Pro Git, checked 12 Nov 2026.
https://fullbytedeveloper.com/media/what-is-git/git-vs-github.webp
Git is the tool. GitHub is one optional place to host a Git repo and collaborate.

## Sources

1. [Pro Git: What is Git? (section 1.3), accessed 2026-11-14](https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
2. [GitHub Docs: About Git, accessed 2026-11-14](https://docs.github.com/en/get-started/using-git/about-git)
