goalie.is_git_repo

goalie.is_git_repo(x: str | PathLike[str]) bool

Check whether the input is a git repository.

Parameters:

x (str or os.PathLike) – Directory path.

Returns:

True if x is a directory tracked by git.

Return type:

bool

Examples

>>> is_git_repo("/tmp")
False