pub fn update_ref(branch: &str, sha: &str) -> Result<()>
Point a branch at a commit, creating it if absent. Does not touch the worktree.