1、新建本地分支  

  git checkout -b uc-gateway-account-zly

2、查看分支状态  

  git branch

    D:\workspace\AutoTest>git branch
    feature-autotest
    master
    onlinebranch
    * uc-gateway-account-zly             

  *表示当前分支 并且现在的状态是成功创建的新的分支并且已经切换到新分支上

3、新建的本地分支push到远程服务器  

   git push originuc-gateway-account-zly:uc-gateway-account-zly 

4、使用git branch -a查看所有分支,会看到remotes/origin/uc-gateway-account-zly这个远程分支,说明新建远程分支成功

5、删除远程分支

  git push origin --delete uc-gateway-account-zly

6、把本地分支和远程分支关联起来  

  git branch --set-upstream-to=origin/uc-gateway-account-zly uc-gateway-account-zly

 

相关文章:

  • 2021-08-11
  • 2021-07-25
  • 2021-08-15
  • 2021-11-06
  • 2021-05-18
  • 2022-02-08
  • 2021-07-03
  • 2022-01-24
猜你喜欢
  • 2022-02-06
  • 2021-09-24
  • 2022-12-23
  • 2021-09-30
  • 2022-01-19
  • 2021-12-23
相关资源
相似解决方案