zhc@hongchangfirst$ git checkout -b hongchangfirst origin/hongchangfirst

出现:

fatal: Cannot update paths and switch to branch 'hongchangfirst' at the same time.

Did you intend to checkout 'hongchangfirst' which can not be resolved as commit?

然后我们执行命令:

git branch -a

里边并不包含远程都hongchangfirst分支。

远程仓库明明有hongchangfirst分支,可是为什么告诉没有呢?

原来这条命令并没有每一次都从远程更新仓库信息,这样子做是为了效率,我们可以手动更新一下:

git fetch origin

然后我们在git branch -a

发现了我们都远程分支,然后我们在做新建一个分支:

git checkout -b hongchangfirst origin/hongchangfirst

Git branch -r 无法获取远程分支,ui可以看见分支但是git 命令无法查看解决方案的更多相关文章

  1. git branch --set-upstream 本地关联远程分支

    最近使用git pull的时候多次碰见下面的情况: There is no tracking information for the current branch.Please specify whi ...

  2. git branch --set-upstream-to 本地关联远程分支

    最近使用git pull的时候多次碰见下面的情况: There is no tracking information for the current branch. Please specify wh ...

  3. 在gitlab上删除分支后,本地git branch -r还能看到

    1. git remote prune --dry-run origin 查看当前有哪些是该消失还存在的分支 2. git remote prune origin 删除上面展示的所有分支 3. git ...

  4. git拉取远程分支并创建本地分支和Git中从远程的分支获取最新的版本到本地

    git拉取远程分支并创建本地分支 一.查看远程分支 使用如下Git命令查看所有远程分支: git branch -r 二.拉取远程分支并创建本地分支 方法一 使用如下命令: git checkout ...

  5. git获取远程服务器的指定分支

    昨天糗大了...进入新公司,公司服务器上有Online为线上版本,开发版本默认的为Master,本地clone的开发版为master,公司用的git 自动部署(puh后服务器自动更新了代码...这个有 ...

  6. git远程删除分支后,本地git branch -a 依然能看到的解决办法

    http://blog.csdn.net/qq_16885135/article/details/52777871 使用 git branch -a 命令可以查http://blog.csdn.net ...

  7. git远程删除分支后,本地执行git branch -a依然能看到删除分支到底该咋整?

    使用命令git branch -a可以查看所有本地分支和远程分支(git branch -r 可以只查看远程分支) 如果发现很多在远程仓库已经删除的分支在本地依然可以看到到底该怎么办呢?(反正强迫症受 ...

  8. Git入门指南十一:Git branch 分支与合并分支

    十五. Git branch 分支 查看当前有哪些branch bixiaopeng@bixiaopengtekiMacBook-Pro xmrobotium$ git branch * master ...

  9. git克隆远程项目分支到本地对应分支

    最近公司改用git了,研究了一下如何把远程的代码克隆到本地. 1. 配置对应信息 git config --global user.name git config --global user.emai ...

随机推荐

  1. CSS 样式属性

    大小 width   宽               body {   min-width:1200px; height  高                      }               ...

  2. LINQ to Objects系列(2)两种查询语法介绍

    LINQ为我们提供了两种查询语法,分别是查询表达式和查询方法语法.这篇文章分为以下几个方面进行总结. 1,一个包含两种查询语法的简单示例 2,查询表达式的结构 3,查询方法相关的运算符 一个包含两种查 ...

  3. Android四大组件-Service

    http://blog.csdn.net/guolin_blog/article/details/11952435 http://www.jianshu.com/p/eeb2bd59853f 概述 定 ...

  4. LeetCode DB: Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...

  5. js实现获取URL参数

    function GetQueryString(name) { var reg = new RegExp("(^|&)"+ name +"=([^&]*) ...

  6. js-redux学习笔记

    1.action creator 就是函数,负责构建一个 action (是的,action creator 这个名字已经很明显了)并返回它. var actionCreator = function ...

  7. 解决写入InfluxDB时,报unbalanced quotes的问题

    从客户端收集到Web站点信息后,写入InfluDB时,报如下异常: InfluxDB.Net.Infrastructure.Influx.InfluxDbApiException: InfluxDb ...

  8. 网络基础 利用vnc viewer访问在vmware虚拟机上的linux

    利用vnc viewer访问在vmware虚拟机上的linux by:授客 QQ:1033553122 Linux服务器为架设在VMware之上的虚拟机,那么可以直接使用VMware自带的vnc,而不 ...

  9. ConstraintLayout (约束布局)属性详情

    本文部分内容来自于网络,点击浏览原文 app:layout_constraintLeft_toLeftOf //Constrains the left side of a child to the l ...

  10. 一种通过async/await实现函数同步执行的方式

    const testArr = [ () => { return new Promise((resolve, reject) => { setTimeout(()=> { alert ...