pub async fn default_branch_name(cwd: &Path) -> Option<String>Expand description
Determine the repository’s default branch name, if available.
This inspects remote configuration first (including the symbolic HEAD
reference) and falls back to common local defaults such as main or
master. Returns None when the information cannot be determined, for
example when the current directory is not inside a Git repository.