4 ms·
> Commits are immutable (representing whole repo state, not a diff) To make things more clear: Repo state here is the contents of all files, and some metadata
by xorcist 3y ago
> Commits are immutable (representing whole repo state, not a diff)
To make things more clear: Repo state here is the contents of all files, and some metadata including a pointer to the previous commit.
So a commit hash uniquely identifies not only a set of files but the unique history leading up to it! That's why we some people like to call git the original block chain (there's no proof of work involved of course so it can never be used for payments or anything like that, but the merkle tree bit is similar enough).