Method GetCommit implementing.