Skip to main content

detect_git_branch

Function detect_git_branch 

Source
pub fn detect_git_branch(cwd: &Path) -> Option<String>
Expand description

Detect the current git branch from a working directory.

Returns None if not in a git repository or git is not available.