git 本地创建的分支,如果在远程没有,那么要提交这些本地分支到远程时,先commit本地修改到本地仓库,建立远程分支名,然后用git push,需要指定本地分支名和刚建立的远程分支名。例如:
$ git remote add remote-branch-name https://remote.com/remote.git
$ git push -u local-branch-name remote-branch-name
git 本地创建的分支,如果在远程没有,那么要提交这些本地分支到远程时,先commit本地修改到本地仓库,建立远程分支名,然后用git push,需要指定本地分支名和刚建立的远程分支名。例如:
$ git remote add remote-branch-name https://remote.com/remote.git
$ git push -u local-branch-name remote-branch-name
转载于:https://my.oschina.net/kjpioo/blog/166988