python - Dulwich ~ push to a certain branch -
i following dulwich in existing git repo:
- change file
- commit
- push branch (not master)
i read documentation , post on so, don't it. can explain how chose specific branch push to?
thanks
during push phase, can specify how update refs in remote repository.
e.g. (untested)::
dulwich.client import get_transport_and_path 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"] client.send_pack(path, update_refs, repo.object_store.generate_pack_contents)
Comments
Post a Comment