Function checkout_commit

Source
pub fn checkout_commit(
    repo_path: &RepoPath,
    commit_hash: CommitId,
) -> Result<()>
Expand description

Detach HEAD to point to a commit then checkout HEAD, does not work if there are uncommitted changes