Added method prevCommitIdExist() for check if a commitId has ever
altered file before.