admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

查看本地分支信息
$ git branch
* master

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

查看分支最后一次提交信息
$ git branch -v
* master 1c4ed79 #AHB-20 add get device subdevice list

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

创建本地分支
$ git branch test-protocol

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

查看本地分支信息
$ git branch
* master
test-protocol

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

查看远程分支信息
$ git branch -r
origin/HEAD -> origin/master
origin/master

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

#查看所有的分支信息
$ git branch -a
* master
test-protocol
remotes/origin/HEAD -> origin/master
remotes/origin/master

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

#切换到本地test-protocol分支
$ git checkout -b test-protocal
Switched to a new branch 'test-protocal'

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (test-protocal)

# 查看分支信息
$ git branch -a
master
* test-protocal
test-protocol
remotes/origin/HEAD -> origin/master
remotes/origin/master

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (test-protocal)

# 将本地test-protocol分支推送至远端
$ git push origin test-protocal:test-protocal
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'test-protocal' on GitHub by visiting:
remote: https://github.com/13701761349/backEndServer/pull/new/test-protoca
remote:
To https://github.com/13701761349/backEndServer.git
* [new branch] test-protocal -> test-protocal

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (test-protocal)
$ git branch -a
master
* test-protocal
test-protocol
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/test-protocal

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (test-protocal)
$

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)
$ git branch -r
origin/HEAD -> origin/master
origin/master
origin/test-protocal

admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master)

#拉取远程分支版本

#git checkout -b 本地分支名 origin/远程分支名

$ git checkout -b test-protocal origin/test-protocal
Switched to a new branch 'test-protocal'
Branch 'test-protocal' set up to track remote branch 'test-protocal' from 'origin'.

git create remote branch (五)的更多相关文章

  1. git pull的时候提示git pull <remote> <branch>

    yuanqiao@yuanqiao-PC MINGW64 /h/WorkSpace/git/dadeTest (dev)$ git pullremote: Enumerating objects: 7 ...

  2. git之remote branch controller(远程分支控制)

    1.创建本地分支 git branch  //查看远程分支 git checkout -b branch_name //创建远程分支 在查看分支git branch 2.将分支提交到远程仓库 此时远程 ...

  3. git branch & git remote branch

    git branch & git remote branch $ git branch -h usage: git branch [<options>] [-r | -a] [-- ...

  4. 【IDEA】 Can't Update No tracked branch configured for branch master or the branch doesn't exist. To make your branch track a remote branch call, for example, git branch --set-upstream-to origin/master

    IDEA点击GIT更新按钮时,报错如下: Can't UpdateNo tracked branch configured for branch master or the branch doesn' ...

  5. Rename a local and remote branch in git

    If you have named a branch incorrectly AND pushed this to the remote repository follow these steps b ...

  6. git clone all branch and create a empty branch

    /******************************************************************** * git clone all branch and cre ...

  7. Git checkout on a remote branch does not work

    I believe this occurs when you are trying to checkout a remote branch that your local git repo is no ...

  8. [Git] How to rename your remote branch

    Rename your local foo branch with bar: git branch -m foo bar Remember this will add the new branch w ...

  9. 使用VSTS的Git进行版本控制(五)——从Team Services Portal管理分支

    使用VSTS的Git进行版本控制(五)--从Team Services Portal管理分支 任务1:创建新分支 1.登录Visual Studio Team Services账号 2.打开Code ...

随机推荐

  1. linux 压力测试工具之ab

    简介 Apache Benchmark(简称ab) 是Apache安装包中自带的压力测试工具 ,简单易用 在此提供 ab 在 centOS7 下的安装和使用方法注:个人发现,之前安装的centos6. ...

  2. 读取txt文件的数据,并将其转换为矩阵

    import numpy as nppath_txt_data = 'C:/Users/51102/Desktop/my_yolo/data/box/train.txt'def input_data( ...

  3. SpringBoot之多Profile配置

    近来在利用闲暇时间巩固下SpringBoot的基本知识,然后自己也做一些笔记,整理下当时所学知识,后面就干脆写到这里来了. 多Profile配置文件 在SpringBoot主配置文件编写的时候,文件名 ...

  4. JavaWeb 之 JSON

    一.概述 1.概念 JSON:JavaScript Object Notation  JavaScript对象表示法 2.基本格式 var p = {"name":"张三 ...

  5. 四级CET大学词汇六级备份

    Cet6六级中要考到法庭词汇的小故事  如何安排六级考试前的一个月1.每天按照我的要求去背单词2.做四套真题,词汇部分 只做词汇 3.做personal dictionary把真题中出现的所有不认识的 ...

  6. day 06 预科

    目录 if判断 if判断习题 for循环 for循环习题 微信机器人 if判断 # 一条狗朝你过来了,你会干吗? 判断: 如果狗是大长腿牵来的狗--->打招呼:如果是条疯狗,跑. # if:如果 ...

  7. js设置页面全屏

    html代码 <!-- 全屏按钮 --> <img id="alarm-fullscreen-toggler" src="/public/index/i ...

  8. MySQL- Host 'xxx' is not allowed to connect to this MySQL server.

    mysql中有个系统数据库mysql,里面有张表user记录该实例的用户及其权限. 第一种方法 将其用户root的host改为%,即允许所有客户端连接. FLUSH PRIVILEGES;是将修改生效 ...

  9. springcloud中微服务的优雅停机(已验证)

    大部分项目部署中,为了方便,可能都直接使用kill -9 服务的pid来停掉服务. 但是由于Eureka采用心跳的机制来上下线服务,会导致服务消费者调用此已经kill的服务提供者然后出错. 可以采用以 ...

  10. 第二次作业之——AchaoCalculator

    AchaoCalculator(阿超计算器) GIT地址 我的GitHub GIT用户名 Pastrain 学号后五位 62213 博客地址 我的博客地址 作业链接 作业内容 Part.1 配置VS中 ...