开发者

Finding the SHA1's of all objects in a commit git

开发者 https://www.devze.com 2023-03-12 19:08 出处:网络
Is there a way to retrieve all the SHA1\'s for all objects (blobs and trees) 开发者_StackOverflow中文版inside of a particular commit in git?I\'m pretty sure that git rev-list will do what you want:

Is there a way to retrieve all the SHA1's for all objects (blobs and trees) 开发者_StackOverflow中文版inside of a particular commit in git?


I'm pretty sure that git rev-list will do what you want:

git rev-list --no-walk <commit> --objects

See the documentation on git rev-list for more information at http://www.kernel.org/pub/software/scm/git/docs/git-rev-list.html.

Edit: Added --no-walk as per Paŭlo Ebermann's suggestion; this will only show the objects for the given ref, without the ancestor commits.

0

精彩评论

暂无评论...
验证码 换一张
取 消