edit- thanks commenters for the correction!
Git commit hashes are indeed deterministic, though it depends on the inputs.
From StackOverflow [0]:
Git uses the following information to generate the sha-1:
* The source tree of the commit (which unravels to all the subtrees and blobs)
* The parent commit sha1
* The author info (with timestamp)
* The committer info (right, those are different!, also with timestamp)
* The commit message