create commit object of the tree object