【发布时间】:2020-05-22 09:01:56
【问题描述】:
如果我想将内容从 remote:master 推送到同一个远程但不同的分支,我该怎么做?
有了git push remote.git master:mybranch,我可以将本地仓库推送到第二个分支
但我想要的不是从本地推送,而是从远程推送
所以remote:master -> remote:branch
这样的?
git push remote.git 'refs/remotes/master:refs/remotes/mybranch'
git push remote.git 'refs/heads/master:refs/heads/mybranch'
【问题讨论】:
标签: git git-branch git-push git-refspec