Skip to main content

create_branch_and_switch

Function create_branch_and_switch 

Source
pub(crate) fn create_branch_and_switch(branch_name: &str) -> Result<()>
Expand description

Creates a new local branch (if desired) and switches to it.

Behaviour:

  • if both the current branch and the target branch are non‑default (not main / master) user confirmation is required.

§Errors