git 从本地分支创建一个新分支。并把新分支推送到线上
git 从本地分支创建一个新分支。并把新分支推送到线上
eg.
本地master分支无法直接推送到线上,但是已经改了很多文件了。
解决方案:
从本地master分支创建新分支features/3.0.0 ,
然后推送到线上。
这样本地已经更改的文件,也会在新分支features/3.0.0 中了。
git checkout -b features/3.0.0
git push origin features/3.0.0
$ git checkout -b iss53 Switched to a new branch "iss53" 它是下面两条命令的简写: $ git branch iss53 $ git checkout iss53 https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%88%86%E6%94%AF%E7%9A%84%E6%96%B0%E5%BB%BA%E4%B8%8E%E5%90%88%E5%B9%B6