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
 

相关文章:

  • 2021-12-18
  • 2021-09-01
  • 2021-09-01
  • 2022-02-07
  • 2022-12-23
  • 2021-09-27
  • 2021-06-17
猜你喜欢
  • 2022-02-09
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-12-20
  • 2022-01-16
相关资源
相似解决方案