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. [NOI2019]弹跳(KD-Tree/四分树/线段树套平衡树 优化建图+Dijkstra)

    本题可以用的方法很多,除去以下三种我所知道的就还有至少三种. 方法一:类似线段树优化建图,将一个平面等分成四份(若只有一行或一列则等分成两份),然后跑Dijkstra即可.建树是$O(n\log n) ...

  2. git 学习笔记 ---解决冲突

    人生不如意之事十之八九,合并分支往往也不是一帆风顺的. 准备新的feature1分支,继续我们的新分支开发: $ git checkout -b feature1 Switched to a new ...

  3. 勒索病毒,华为/H3C三层交换机/路由器用ACL访问控制实现端口禁用

    前不久勒索病毒横行,很多人都纷纷中招,从公司到个人,损失相当惨重.有些公司在互联网入口上做了控制,但是这样并非完全,万一有人把中了毒的U盘插入网内设备上呢?那我们的内网中很有可能集体中招(打过相关补丁 ...

  4. 3.将模型添加到 ASP.NET Core MVC 应用

    添加数据模型类 右键单击 Models 文件夹,然后单击“添加” > “类”. 将类命名“Movie”.向 Movie 类添加以下属性: using System;using System.Co ...

  5. 利用jQuery-Word-Export导出word (含ECharts)

      写在前面的话:写博客的初衷是想把自己学到的知识总结下来,在写的过程中,相当于又把知识梳理了一遍.我坚信有输入,有输出,技术才会进步.我一般都会自己写一个小demo,测试没有问题,再进行整理. 在实 ...

  6. Python进阶(九)----json模块, pickle模块, os模块,sys模块,hashlib模块

    Python进阶----json模块, pickle模块, os模块,sys模块,hashlib模块 一丶序列化模块 什么是序列化: ​ 将一种数据结构,转换成一个特殊的序列(特殊字符串,用于网络传输 ...

  7. Stack布局中定位的方式

    //……省略无关代码…… child: new Column( children: <Widget>[ new SizedBox(height: 20.0), new Stack( ali ...

  8. 给用过SAP CRM中间件的老哥老姐们讲讲SAP CPI

    最近Jerry由于项目需要,又得学习一个新工具:SAP Cloud Platform Integration,简称CPI,以前又叫做HCI - HANA Cloud Platform Integrat ...

  9. 前端构建工具 Gulp 压缩合并JS/CSS 并添加版本号、ES6转ES5

    Gulp 基于 Node.js 的前端构建工具,可以实现前端代码的编译(sass.less).压缩合并(JS.CSS).测试:图片的压缩:已经添加 JS 和 CSS 版本号,防止浏览器缓存. 1. 安 ...

  10. 最佳移动端h5自适应rem适配方案

    一.利用lib-flexible.postcss-plugin-px2rem插件 进行移动端rem适配. 1.第一 引入lib-flexible . 安装lib-flexible: npm i lib ...