Is there a way to get SHA of file for specific Git commit?
It's possible with 2 commands:
git show COMMIT_VERSION:myfile.txt > ~/tmp/myfile.txt
git hash-object ./tmp/myfile.txt
But, maybe there's specific command in Git that does exactly that?
git ls-tree COMMIT_VERSION myfile.txt
在其第三个字段中似乎包含相同的结果。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.