Skip to main content

default_branch

Function default_branch 

Source
pub fn default_branch(repo: &Path) -> Result<String>
Expand description

Default branch: origin/HEAD’s target if it resolves locally; otherwise main; otherwise master.

§Errors

Returns Err if no default branch is found.