pub fn checkout_branch(repo_path: &RepoPath, branch_name: &str) -> Result<()>
Expand description
Switch branch to given branch_name
.
Method will fail if there are conflicting changes between current and target branch. However, if files are not conflicting, they will remain in tree (e.g. tracked new file is not conflicting and therefore is kept in tree even after checkout).