英文:
Git: push remote A branch Foo to remote B branch bar
问题
可以将A/foo
推送到B/bar
吗,其中A
和B
是不同的远程,显然,foo
和bar
是分支名称?
英文:
Is it possible to push A/foo
to B/bar
where A
and B
are remotes( different, obviously ), and foo
and bar
are branch names?
答案1
得分: 2
是的,您可以简单地首先将它拉到一个临时本地分支,然后推送到远程:
git pull A foo
git push B tmp:bar
英文:
Yes, you can simply pull it first to a temporary local branch, then push it to the remote:
git checkout -b tmp
git pull A foo
git push B tmp:bar
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论