Will commits in git and mercurial repositories with the same history have the same hash?
问题 When using git to clone an hg repository, or when migrating from hg to git, will the hashes remain the same? 回答1: By inspection, the answer appears to be "no". hg clone ssh://some.server.com/path/hgproject/ git clone hg::ssh://some.server.com/path/hgproject/ Followed by: hg log -l 5 git log -n 5 Show different commit hashes for the same commits. While both git and hg use SHA-1 hashes, there must be a difference in what they are hashing, perhaps the metadata. Any tooling dependent on the