Python 德威治~推到某个分支
我希望在现有的git回购中执行以下操作:Python 德威治~推到某个分支,python,git,dulwich,Python,Git,Dulwich,我希望在现有的git回购中执行以下操作: 更改文件 承诺 推送到某个分支(不是主分支) 我读了文档,也读了这个,但我不明白。有人能解释一下如何选择要推送到的特定分支吗 谢谢在推送阶段,您可以指定如何更新远程存储库中的引用 例如(未经测试):: from dulwich.client import get_transport_and_path from dulwich.repo import Repo repo = Repo(".") client, path = get_transp
- 更改文件
- 承诺
- 推送到某个分支(不是主分支)
谢谢在推送阶段,您可以指定如何更新远程存储库中的引用 例如(未经测试)::
from dulwich.client import get_transport_and_path
from dulwich.repo import Repo
repo = Repo(".")
client, path = get_transport_and_path("git+ssh://git@github.com/jelmer/foo")
def update_refs(refs):
refs["refs/heads/somebranch"] = repo["refs/heads/somebranch"].id
client.send_pack(path, update_refs, repo.object_store.generate_pack_data)