The background of the problem is this:
In order to use http://coding.net和http://github.com兩個(gè)網(wǎng)站的pages服務(wù),我本地git倉庫關(guān)聯(lián)了兩個(gè)remote倉庫,分別是http://coding.net和http://github.com遠(yuǎn)程庫的,兩個(gè)遠(yuǎn)程庫的pages服務(wù)分支名分別是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.
走同樣的路,發(fā)現(xiàn)不同的人生
git push (remote名) (本地分支名:遠(yuǎn)程分支名)
如:
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.