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. pytest_06_fixture之yield实现teardown

    上一篇讲到fixture通过scope参数控制setup级别,既然有setup作为用例之前前的操作,用例执行完之后那肯定也有teardown操作. 这里用到fixture的teardown操作并不是独 ...

  2. npm和Node.js简介

    Node.js Node.js是JavaScript的一种运行环境,是对Google V8引擎进行的封装.是一个服务器端的javascript的解释器.Node.js允许通过JavaScript和一系 ...

  3. 创建图 figure & figcaption

    如报纸.杂志.报告等其他媒介上看到过图.通常,图是由页面上的文本引述出. 在HTML5出现之前,没有专门实现这个目的的元素,因此一些开发人员想出了他们自己的解决办法(通常会使用不那么理想的.没有语义的 ...

  4. 原油petrolaeum石油 Archaic spelling of petroleum

    petrolaeum (uncountable) Archaic spelling of petroleum petroleum See also: Petroleum Contents [hide] ...

  5. java static变量及函数

    java以类为基础,没有游离在类之外单独存在的变量.所以,c++中的全局变量,在java中应该是不存在的.java中有的是成员变量和成员方法.当成员前以static修饰时,即为静态成员变量或静态成员方 ...

  6. Linu如何查看磁盘占用情况及处理办法

    free -h: 查看当前剩余的内存大小 df: 查看文件系统磁盘使用率,可能free -h得到的剩余空间还有很多,但是df查询得到的部分文件系统磁盘使用率较高 当发现磁盘使用率较高的时候,可以: 先 ...

  7. AIX 静默安装11gR2 RAC

    AIX安装11gR2  RAC   一.1  BLOG文档结构图       一.2  前言部分   一.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它 ...

  8. selenium安装并导入pycharm

    selenium安装 1.python的pip安装,命令pip install selenium 2.检查是否成功安装 打开pycharm-->File-->Settings-->P ...

  9. kindedtor 数据传输问题

    <script src="/static/kindeditor/kindeditor-all.js"></script><script src=&qu ...

  10. nodejs express+nodemon 实现自动刷新 (热更新)

    1.全局安装 nodemon npm i nodemon -g -f 2. 在项目中安装nodemon npm i nodemon -f 3.使用nodemon 在express项目中 运行nodem ...