$ git add somefile.txt $ TREE_HASH_PREDICTION=$(???) $ git commit -m "some message" $ TREE_HASH=$(git rev-parse HEAD^{tree})
assuming commit d