LESSON 1.17 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Git's object model
Watch Git store each file by its hash, and see branches move as pointers.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 1.17 · REPO BAYOBJECTS 0 · HEAD → main · main: no file
01
Stage 1 of 6 · Make a repository
git init makes a repository: a .git folder for objects, refs and HEAD. HEAD names main, but main has no commit yet.
Explain it simply
Your project folder, toy, holds two files. git init adds a hidden folder, .git, and that's the repository. It will keep every saved version, plus small files that name them. HEAD says which branch you're on. It names main, but main has no file yet, because nothing is saved.
The working tree holds docs/notes.txt and hello.py. The .git folder has no objects. HEAD holds ref: refs/heads/main, and refs/heads/main does not exist.
file bytes, blobtree, commit, tag objectid, pointer, refwritten in this stageno file yet
Toy: 2 files · real Git ids (SHA-1) · loose objects only · the index is not drawn
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A repository is a store of objects plus refs that name them.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.