A Git commit is one kind of "object" in git. Objects in Git are hashed like so:
SHA1("[objecttype] [objectlen]\0[objectdata]")
and a commit object looks like this (blatantly stolen from the Stripe V3 CTF):
tree #{tree}
parent #{parent}
author CTF user <me@example.com> #{timestamp} +0000
committer CTF user <me@example.com> #{timestamp} +0000
Give me a Gitcoin
The "tree" in the commit is the hash tree reference that actually points to your code.
Comments
Not random.
A Git commit is one kind of "object" in git. Objects in Git are hashed like so:
SHA1("[objecttype] [objectlen]\0[objectdata]")
and a commit object looks like this (blatantly stolen from the Stripe V3 CTF):
The "tree" in the commit is the hash tree reference that actually points to your code.