3. Three kinds of object
Git's three main objects are blobs (file content without a name), trees (names mapped to blobs and trees), and commits (a tree, parents, author, message), all named by content.

3. Three kinds of object

Git's three main objects are blobs (file content without a name), trees (names mapped to blobs and trees), and commits (a tree, parents, author, message), all named by content.

Knowing that filenames live in trees and content in blobs explains renames, empty directories, and what a commit really points at.

Git stores three main kinds of thing. All of them named by content. Blob. Tree. Commit.

A blob is the content of one file. Just the bytes. No filename.

A tree is a folder. It lists names, and for each name, the blob or tree it points at.

A commit is the photo. It points at one tree. It names its parent commit, the author, and a message.

Three kinds. Everything in your history is built from them.

Check yourself. Where is a filename stored?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0

Connections show where other documents or comments link to this document.

Related documents

Loading connections…