0

If I want to push the contents from a remote:master to the same remote but a different branch, how can I do this?

With git push remote.git master:mybranch I can push the local repo into the second branch

But what I'd like is push not from the local but from the remote

So remote:master -> remote:branch

Something like this?

git push remote.git 'refs/remotes/master:refs/remotes/mybranch'
git push remote.git 'refs/heads/master:refs/heads/mybranch'
4

1 回答 1

1

您必须将实际的 master 拉入本地分支(您可以将其执行到新分支),然后推送到远程。

于 2020-02-06T10:46:09.997 回答