Git

Documentation

universions.git.get_git_version(git_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]

Get the Git versions.

Parameters:git_path – The path to the Git binary to check. If not defined, it uses “node”
Returns:The Git version.

Python example

>>> from universions.git import get_git_version
>>> get_git_version()
Version(major=2, minor=20, patch=1, prerelease=None, build=None)

CLI example

>>> universions git
2.20