Git Facts

See also: Git Operations.

git.GitBranch

host.get_fact(GitBranch, repo)

git.GitConfig

host.get_fact(GitConfig, repo=None, system=False)

git.GitLocalCommit

host.get_fact(GitLocalCommit, repo, ref='HEAD')

Returns the SHA of ref (defaults to HEAD) in a local git repository, or None when the repository does not exist, the ref is unknown, or the command fails.

git.GitRemoteBranchCommit

host.get_fact(GitRemoteBranchCommit, repo, remote='origin', branch=None)

Returns the SHA of the tip of branch on remote as reported by git ls-remote. Returns None when the remote is unreachable, the branch does not exist on the remote, or the repository is missing.

git.GitTag

host.get_fact(GitTag, repo)

git.GitTrackingBranch

host.get_fact(GitTrackingBranch, repo)