git: how to get tree hash of next commit before commiting?

后端 未结 0 597
不知归路
不知归路 2021-02-19 01:53
$ git add somefile.txt
$ TREE_HASH_PREDICTION=$(???)
$ git commit -m "some message"
$ TREE_HASH=$(git rev-parse HEAD^{tree})

assuming commit d

相关标签:
回答
  • 消灭零回复
提交回复
热议问题