Search SHA1 of all objects in commit git

Is there a way to get all SHA1 for all objects (drops and trees) inside a specific commit in git?

+4
source share
1 answer

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

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

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

Edit: Added --no-walk as proposed by Pailo Eberman; it will show only objects for a given ref, without ancestors.

+3
source

All Articles