python - How to get count of unpublished commit with GitPython? -
with git status can information count of unpublished commits:
» git status # on branch master # branch ahead of 'origin/master' 2 commits. # (use "git push" publish local commits) # nothing commit, working directory clean i want unpublished commits (or count) gitpython. docs found repo.git.status(), not want.
the command looking is:
repo.iter_commits('branch..branch@{u}') or if want list:
list(repo.iter_commits('branch..branch@{u}')) the branch@{u} syntax refers upstream branch of branch.
Comments
Post a Comment