The git local warehouse is associated with multiple remotes. How to use one local branch to push code to different remote branches?
怪我咯
怪我咯 2017-05-02 09:33:08
0
2
656

The background of the problem is this:
In order to use http://coding.net和http://github.com两个网站的pages服务,我本地git仓库关联了两个remote仓库,分别是http://coding.net和http://github.com远程库的,两个远程库的pages服务分支名分别是coding-pages和gh-pages。

at the same time, I have added these two remote libraries locally, assuming that I now develop the local branch The name is pagesServe. Now that the code commit has been submitted, how to push the current code to the coding-pages branch of coding and gh-pages of github respectively?

Putting aside the background of the problem, the description itself is:
My local development branch is named A. After each development, the code must be pushed to the B branch of the remote library remote01 and the C branch of the remote library remote02.
Is this idea feasible? What is the operation process? I'm new to git, so the more detailed you can be, the better.
Thank you everyone.

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
phpcn_u1582
git push (remote名) (本地分支名:远程分支名)
如:
git push remote01 A:B
世界只因有你
git remote add origin <github-url>
git remote set-url --add origin <coding-url>

This can be merged into one remote.

Of course you can also open .git/config and change it directly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template