pub fn switch(branch_name: &str) -> Result<(), Box<CmdError>>Expand description
Checkout a branch or detach HEAD; supports previous branch shorthand and branch creation via guessing.
Defers to git switch --guess to leverage porcelain semantics, which can create a new branch
if the name is ambiguous and matches an existing remote branch.
§Errors
- Spawning or executing the
git switchcommand fails.
§Future Work
- Expose progress callbacks for large checkouts.