pub fn current_branch() -> Option<String>
Return the current git branch name, or None if not inside a repo, on detached HEAD, or if git is unavailable. Never errors — git absence is treated the same as “not in a repo”.
None
git