Move functions under CommitToRepository class