2024-04-29 14:11:20 发布
网友
标题说明了一切。我正在使用pygit2,并试图找出如何实现使用git cli可以实现的以下目标: git remote set-branches origin remote_branch_name
pygit2
git remote set-branches origin remote_branch_name
If可能比直接set the configuration更简单(因为pygit2 Remotes没有明显的方式来设置获取URL) 使用^{}:
repo_obj = pygit2.Repository(repopath) repo_obj.config.set_multivar( 'remote.origin.fetch', '', '+refs/heads/remote_branch_name:refs/remotes/myOrigin/remote_branch_name' )
If可能比直接set the configuration更简单(因为pygit2 Remotes没有明显的方式来设置获取URL)} :
使用^{
相关问题 更多 >
编程相关推荐