我试图在特定的开始提交后使用Python从分支中提取所有提交消息的列表。我从GITPython api找不到任何有用的功能,或者我只是错过了它。有人可以指导我吗?
您可能想尝试PyDriller,它更容易:
for commit in RepositoryMining("path_to_repo", from_commit="STARTING COMMIT").traverse_commits():
print(commit.msg)
如果要提交特定分支的提交,请添加参数only_in_branch="BRANCH_NAME"
。文件:http://pydriller.readthedocs.io/en/latest/