View on GitHub

How Git actually stores your code

Software engineering planned

Git is a key-value store wearing a version control costume.

The idea

Every file, folder and commit in Git is an object, stored under the hash of its contents. A commit points to a tree, a tree points to files and other trees, and a branch is just a name pointing to a commit.

Once you see that, branches, merges and rebases stop being mysterious: they’re all ways of creating new objects and moving pointers.

What the lesson will build

Key ideas

The video

When it’s published, the code will live in software-engineering/ and this page will link to it.


All topics · Suggest a topic