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. php mysqli 预处理操作数据库

    用到的SQL表 CREATE TABLE `student_01` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARAC ...

  2. linux上文件的上传和下载

    现整理一篇linux上文件的上传和下载 第一种方式就是在windos上安装工具 如: 工具如何使用我就不赘述了,easy 第二种方式就是使用liux的命令(首先是文件上传) 上传文件(首先创建文件夹如 ...

  3. Java中守护线程的总结

    在Java中有两类线程:User Thread(用户线程).Daemon Thread(守护线程) 用个比较通俗的比如,任何一个守护线程都是整个JVM中所有非守护线程的保姆: 只要当前JVM实例中尚存 ...

  4. NET Core 3.0 AutoFac替换内置DI的新姿势

    原文:NET Core 3.0 AutoFac替换内置DI的新姿势 .NET Core 3.0 和 以往版本不同,替换AutoFac服务的方式有了一定的变化,在尝试着升级项目的时候出现了一些问题. 原 ...

  5. 使用jmeter对dubbo接口进行性能测试教程及常见问题处理

    一.   测试脚本编写 脚本可参考git项目: https://github.com/aland-1415/dubbo-interface-test.git 1. pom依赖 (注意添加的jmeter ...

  6. requirejs:模块加载(require)及定义(define)时的路径理解

    给新来的实习生普及下JS基本知识,看到比较好的文章 转载https://blog.csdn.net/xuxiaoping1989/article/details/52384778 接触过require ...

  7. webpack-dev-server提示css模块解析失败,但已经装了css-loader

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/a117616/article/detai ...

  8. Shallow copy and Deep copy

    Shallow copy and Deep copy 第一部分: 一.来自wikipidia的解释: Shallow copy One method of copying an object is t ...

  9. 京信通信成功打造自动化工厂(MES应用案例)

    企业介绍: 京信通信成立于1997年,是一家集研发.生产.销售及服务于一体的移动通信外围设备专业厂商,致力于为客户提供无线覆盖和传输的整体解决方案,于2003年在香港联交所主板上市(2342.HK), ...

  10. 源码解析-url状态检测神器ping-url

    前言 ping-url是我最近开源的一个小工具,这篇文章也是专门写它设计理念的科普文. 为什么会做这个ping-url开源工具呢? 起因是:本小哥在某天接到一个特殊的需求,要用前端的方式判断任意一个u ...