Provides access to Commit objects and easy branch listing.
- License: 3-Clause BSD
- Python: Python 3.6+
Install using pip:
python3 -m pip install atudomain-git --user Alternatively, you can just append downloaded repository path to PYTHONPATH.
Import Git class:
from atudomain.git import GitCreate Git object:
git = Git('/home/user/example-repo')Get list of remote origin branches:
branches = git.get_branches(include='^remotes/origin')Get list of local branches:
branches = git.get_branches(exclude='^remotes/')Get list of Commits for the current branch:
commits = git.get_commits()Get list with last Commit for the current branch:
commits = git.get_commits('HEAD^..HEAD')Get committer date from Commit:
committer_date = commits[0].committer_dateGet commit id from Commit:
commit_id = commits[0].commit_idCheck if Commit is a merge:
is_merge = commits[0].is_merge