0

I have a tree of commit found by SHA-1,code is: tree = repo.tree(sha) now I need to find blob by file name and display its content

4

1 回答 1

1

鉴于提交本身的 SHA1,您将:

git show SHA1:path/to/your/file.txt

如果你知道 blob 本身的 sha1,你可以

git cat-file blob SHA1
于 2011-11-21T19:55:35.137 回答