问题描述
我正在尝试使用 gitpython 中的 log 函数获取在 bitbucket 中的分支上进行的所有提交。但我没有得到所有的提交。
import git
from git import Repo
bitBucketUrl='bitBucketRepoUrl'
localPath='localPath'
g=git.Git(localPath)
branchName='branch1'
gitUpdate(localPath,bitBucketUrl,branchName)
def gitUpdate(localPath,branchName):
folder=(os.path.basename(path))
if os.path.isdir(path):
g.pull(g.remote())
else:
Repo.clone_from(git_Url,path,branch=branchName)
since='--since='+str(start) #startTime for commits
until='--until='+str(end) #endTime for commits
commitDetails =g.log(since,until,'--pretty=format:{ "commit": "%H"}')
``
Suppose there are 2 branches,master & branch1. When I make a commmit in branch1 to file.java and then make a commit in master for the same file ie. file.java,I'm not getting commits in branch1. Thanks.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)