How does git assure that commit SHA keys for identical operations/data are still unique?

后端 未结 4 1892
Happy的楠姐
Happy的楠姐 2021-01-17 22:22

If I create a file foo with touch foo and then run shasum foo it will print out

da39a3ee5e6b4b0d3255bfef95601890afd80709

4条回答
  •  [愿得一人]
    2021-01-17 22:54

    It doesn't, but you will have to manually construct the commit to get the timestamps to line up. You can manually construct a whole valid repository identical to another, by editing the .git/objects files, but because newer commits contain the hashes of older commits this will of course have to be exactly identical.

提交回复
热议问题