Skip to main content

switch_branch

Function switch_branch 

Source
pub fn switch_branch(_path: &Path, _branch_name: &str) -> Result<()>
Expand description

Switches to a specified git branch.

§Parameters

  • path: The path to the git repository.
  • branch_name: The name of the branch to switch to.

§Returns

  • Ok(()) if the branch was switched successfully.
  • Err(Error) if an error occurred during branch switching.