如何将功能分支中的文件推送到遥控器的主分支?

问题描述:

说我有2个遥控器:A和B.A的主分支与本地master分支同步,而B的master分支没有文件.

Say I have 2 remotes: A, and B. A's mater branch is in sync with the local master branch, and B's master branch has no file.

在我的本地仓库中,我有2个分支:master和feature.

On my local repo, I have 2 branches: master, and feature.

如何将功能分支中的文件上传到远程B的master分支.

How can I upload the files in the feature branch to a remote B's master branch.

执行push时可以指定远程和分支.

You can specify the remote and branch when performing a push.

假设feature是当前分支:

$ git push <remote> <local_branch>:<remote_branch>
$ git push B feature:master