git push到遠程新分支

獲取遠程代碼並在本地切換到一個新分支修改後,想要 push 到遠端與原來不一樣的新分支,可使用下面的命令實現:
git push origin 本地分支:遠端但願建立的分支git

上面的本地分支 是基於拉取的遠程代碼新建的新分支bash

例如git下來的分支爲master.net

git branch
>>> *master
git push origin master:my_remote_new_branch
#遠端便可建立新的分支my_remote_new_branch,提交本地修改

本文轉自:http://www.javashuo.com/article/p-gcqavmsr-bq.htmlcode

相關文章
相關標籤/搜索