I need a shell command-line which puts the tree hash corresponding to a specific commit hash. I know that git cat-file commit $COMMITID | grep ^tree
can do it, but I have to filter the output of that. Is there any command which prints only the hash?
git log -1 --pretty="%T" $COMMITID
git rev-parse $COMMITID^{tree}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With