项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下:

error: pathspec 'origin/test' did not match any file(s) known to git.

解决方法:

1、执行命令git fetch取回所有分支的更新

2、执行git branch -a可以看到test分支(已经更新分支信息)

3、切换分支git checkout test

转自 https://blog.csdn.net/lissdy/article/details/50291995

git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git的更多相关文章

  1. 在使用 Git pull 时候报错 error: inflate

    在使用 Git pull 时候报错 error: inflate 具体的错误是 这样的 error: inflate: data stream error (unknown compression m ...

  2. xxx did not match any file(s) known to git

    切换分支的时候,报了标题这么个错误,error: pathspec ''xxx did not match any file(s) known to git. 看见不能切换分支,我首先 git sta ...

  3. git——创建分支后,切换分支报错(error: pathspec 'master' did not match any file(s) known to git)

    error: pathspec 'master' did not match any file(s) known to git 解决办法: 1.查看分支 git branch -a 2.获取所有分支 ...

  4. git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'

    报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...

  5. Git添加远程报错:remote origin already exists.

    在本地创建了一个Git仓库,如何在Github创建一个Git仓库,并且让这两个仓库进行远程同步,这样Github上的仓库既可以作为备份仓库,还可以通过该仓库进行多人协作. 1.登录github,建立一 ...

  6. Error: pathspec '*' did not match any file(s) known to git.

    git切换分支报错 error: pathspec 'develop' did not match any file(s) known to git. 解决办法如下: plumm@MACY-PC MI ...

  7. git commit 提交不了 error: pathspec 'project'' did not match any file(s) known to git.

    1. 问题--使用git将代码提交到码云,使用到以下命令时: git commit -m 'init project' # 报错 error: pathspec 'project'' did not ...

  8. git提交代码报错 trailing whitespace的解决方法

    1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...

  9. git删除本地分支失败,报错error: branch 'test219' not found.

    错误: 删除本地分支报错,操作如下: git branch -d test219 操作失败,错误信息:error: branch 'test219' not found git branch -D t ...

随机推荐

  1. CRM 权限设置 ss

    表结构的设计 权限表 url -url地址的正则表达式 ^$ title - 标题 角色表 name - 角色名称 permissions 多对多关联权限表 (权限和角色的关系表) 用户表 name ...

  2. <转>jmeter(六)元件的作用域与执行顺序

    本博客转载自:http://www.cnblogs.com/imyalost/category/846346.html 个人感觉不错,对jmeter讲解非常详细,担心以后找不到了,所以转发出来,留着慢 ...

  3. Caddy – 方便够用的 HTTPS server 新手教程

    最近发现了一个 golang 开发的 HTTP server,叫做 Caddy,它配置起来十分简便,甚至可以 28 秒配置好一个支持 http2 的 server ,而且对各种 http 新特性都支持 ...

  4. 可视化的fineBI很高大上 使用简单,简单操作了一下,拖一拖就行,收费 只能看一下人家的demo 网站 http://demo.finebi.com/webroot/decision#directory

  5. Spring P命名空间 02

    P命名空间 装配属性 使用<property> 元素为Bean 的属性装配值和引用并不太复杂.尽管如此,Spring 的命名空间p 提供了另一种Bean 属性的装配方式,该方式不需要配置如 ...

  6. java内存泄漏与内存溢出

    https://www.cnblogs.com/panxuejun/p/5883044.html 内存溢出 out of memory,是指程序在申请内存时,没有足够的内存空间供其使用,出现out o ...

  7. mybatis总结之一

    今日内容:mybatis数据持久层的一种表现,在一定程度上,取代了jdbc. 1.建maven...... 在pom.xml中进行配置,添加mabatis包,junit测试jar包,添加连接mysql ...

  8. django模型的crud操作

    一个建立好的模型,django会生成一套完整的API,以便对对象进行crud操作,下面就详细介绍crud操作. 先说一下操作环境: python2.7, django1.11.8, win7系统,借助 ...

  9. python类的__slots__属性、__del__属性、上下文(__enter__和__exit__)、

    常规情况下,类的属性字典是共享的,而实例的字典是独立的.如果一个类的属性较少,但是拥有很多的实例,这些实例的属性字典会占用较多的内存空间.对这样的类来说,为了节省内存空间,可以使用__slots__类 ...

  10. 点击button后刷新了页面

    今天遇到一个特别奇怪的事,在页面中使用button标签,添加了点击事件onclic,点击的时候倒是执行了绑定的方法,但页面被刷新了! 什么鬼?我没与提交表单啊! 原来,button默认具有提交表单的动 ...