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. Django开发之module

    1.首先需要安装你要使用的数据的python模块组件 2.需要新建一个app 切换到工程根目录下,然后执行django-admin.py startpapp firstModule 编辑first/s ...

  2. 或与异或 [背包DP]

    也许更好的阅读体验 \(\mathcal{Description}\) 给定\(n\)和长度为\(n\)的数组\(a\) 问从\(a\)中选取任意个数使得其 异或起来的值 等于 或起来的值 的方案数 ...

  3. 换个语言学一下 Golang (6)——数组,切片和字典

    在上面的章节里面,我们讲过Go内置的基本数据类型.现在我们来看一下Go内置的高级数据类型,数组,切片和字典. 数组(Array) 数组是一个具有相同数据类型的元素组成的固定长度的有序集合.比如下面的例 ...

  4. iOS之集成GoogleMap定位、搜索注意事项

    简介: 最近花了些时间看了GoogleMap官方文件并集成到国际版app中,网上关于GoogleMap for iOS的讲解相对Android来说少一点,比较有帮助的几乎全是英文文档.下面是我开发过程 ...

  5. Synchronized可重入锁分析

    可重入锁又称递归锁,是指在同一个线程在外层方法获取锁的时候,再进入该线程的内层方法会自动获取锁(前提是锁对象必须是同一对象或者class), 不会因为之前已经获取过还没实方而发生阻塞.即同一线程可执行 ...

  6. JavaWeb项目目录结构

    今天本来是准备学习spring mvc + mybatis,结果被idea的配置环境卡主了,自己刚刚接触JavaWeb不久,所以浪费了很多时间.最终我回归最简单的servlet & jsp,并 ...

  7. 【RAC】rac环境下的数据库备份与还原

    [RAC]rac环境下的数据库备份与还原 一.1  BLOG文档结构图 一.2  前言部分 一.2.1  导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~ ...

  8. Apache Flink 零基础入门(转)

    这是一份很好的 Apache Flink 零基础入门教程. Apache Flink 零基础入门(一&二):基础概念解析 Apache Flink 零基础入门(三):开发环境搭建和应用的配置. ...

  9. Python学习日记(二十九) 网络编程

    早期的计算机通信需要有一个中间件,A要给B传东西,A必须要把信息传给中间件,B再把从中间件中拿到信息 由于不同机器之间需要通信就产生了网络 软件开发的架构 1.C/S架构 服务器-客户机,即Clien ...

  10. Centos7.3安装nexus-3.14.0-04

    nexus-3.14.0-04的安装       nexus-3.14.0-04-unix.tar.gz             1.下载nexus             2.上传到服务器/root ...