How to get SHA of file for specific Git commit?
commit, git, sha
Solution
`git ls-tree COMMIT_VERSION myfile.txt` appears to contain the same result in its third field.
Problem
Is there a way to get SHA of file for specific Git commit? It's possible with 2 commands: - retrieving file `git show COMMIT_VERSION:myfile.txt > ~/tmp/myfile.txt` - calculating SHA `git hash-object ./tmp/myfile.txt` But, maybe there's specific command in Git that does exactly that?