git

git#


class GitStatus(commit: str, has_unstaged_changes: bool, has_staged_uncommitted_changes: bool, has_untracked_files: bool)[source]#

Bases: ToStringMixin

commit: str#
has_unstaged_changes: bool#
has_staged_uncommitted_changes: bool#
has_untracked_files: bool#
property is_clean: bool#
git_status(log_error: bool = True) Optional[GitStatus][source]#

Gets the git status of the current repository.

Parameters:

log_error – whether to log an error if the git status cannot be determined

Returns:

the git status, or None if it cannot be determined