pub fn checkout_ref(repo_path: &Path, ref_spec: &str) -> Result<(), GitError>
Checkout a specific ref (commit SHA, tag, or branch).