Unique identifier for file in Git Repository
问题 Does there exist any unique identifier for files in a Git Repository? This unique identifier must be the same after some commits (modifying files), or after renaming and moving file(s). Does such a thing exist? I tried git ls-files --debug but I didn't find a unique identifier with the characteristics listed above. 回答1: The only unique identifier for a file ("blob") within a git repo is its SHA-1, but that is a checksum of the file's contents (plus the fact of it being a file/blob). It