← Thursday, October 8, 2026Languages & toolsDeep dive

Git refs are mutable names pointing to content-addressed objects

matklad.github.io 5 min read Editor score 7/10

The author expands Git’s model from an immutable content-addressable database to include a mutable key-value map of refs, clarifying the difference between `origin master` and `origin/master`. This mental model helps engineers understand common Git operations and recovery paths.

What
Git refs are mutable string-keyed names pointing to content-addressed objects; branches, tags, and notes are refs.
How
During fetch, Git reads a remote source ref and saves its value locally under a target ref; shorthand can hide those names.
Why it matters
Understanding refs helps engineers reason about mutable names separately from immutable commit objects.
contains fetches value remoterepository refs/heads/mast… refs/remotes/or…
Fetch reads a remote source ref and stores its value under a local target ref. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.