project_release.git.current_branch_name

project_release.git.current_branch_name(repo: Repo) str | None[source]

Return the current branch name.

Parameters:

repo – The current git repository.

Returns:

The current branch name or None if detached.

Return type:

str or None