Skip to main content

current_branch

Function current_branch 

Source
pub fn current_branch() -> Result<String>
Expand description

Return the name of the current git branch.

§Errors

Returns an error if the current directory is not a git repository or git is not installed.