Slide 4
Slide 4 text
THE GIT OBJECT MODEL
Id (sha)
Author
Commiter
Author time
Commit time
Message
Parents
Tree
Commit
Id (sha)
Nodes (with name
and mode)
Tree
Id (sha)
Contents
Blob
Git Objects (simplified)
Friday, June 8, 12
I know what you’re thinking, though. What’s the git index? What’s a git object? First things first.
This is a simplified view of the Git object model. Some parts are missing, but those are more rare, and not yet
supported by Gittern.
You probably know what a commit is? You might say that it’s a snapshot of your content or something like that, but
to Git, a commit is basically just a tree, with some metadata. There’s an author, a commiter, timestamps, a message,
and zero or more parents.
The tree, on the other hand, basically just references a bunch of other git objects, along with their name and their
mode. Same kind of mode as in UNIX filesystems.
The tree can either reference other trees, or commits (but we’re not gonna talk about that), or it can reference blobs.
A blob is basically just data.
These three objects are known as Git objects, and almost every repo you’re using has them.