项目上有一个分支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. highchart应用示例2-上:圆角柱状图,下:多指标曲线图

    1.ajax调用接口获取数据 function getCityData() { var date1 = $('#datetimepicker1').val(); var date2 = $('#dat ...

  2. AtCoder Regular Contest 077 C - pushpush

    题目链接:http://arc077.contest.atcoder.jp/tasks/arc077_a Time limit : 2sec / Memory limit : 256MB Score ...

  3. FFMPEG结构体分析:AVFrame(解码后的数据)

    https://blog.csdn.net/jxcr1984/article/details/52766524 本文转自: http://blog.csdn.net/leixiaohua1020/ar ...

  4. python selenium chrome有界面与无界面模式

    from selenium.webdriver.chrome.options import Options from selenium import webdriver # 无界面模式 def Chr ...

  5. selenium webdriver 实现Canvas画布自动化测试

    https://blog.csdn.net/xiaoguanyusb/article/details/80324210 由借鉴意义, 转过来 canvas 是一个画布,定位元素时只能定位到画布上,如下 ...

  6. Golang闭包案例分析与普通函数对比

    闭包案例 package main import ( "fmt" "strings" //记住一定引入strings包 ) //①编写一个函数makeSuffi ...

  7. linux 函数库使用

    程序函数库可分为3种类型:静态函 数库(static libraries).共享函数库(shared libraries)和动态加载函数库(dynamically loaded libraries) ...

  8. DL_WITH_PY系统学习(第2章)

    ​ 本节提示: 1.第一个dl例子: 2.tensor和tensor操作: 3.DL如何通过逆向传播和梯度下降达到学习目的. 2.1 输入数据集的格式 ,*,))) network.add(layer ...

  9. win7记事本txt图标显示异常解决方法

    链接:https://zhidao.baidu.com/question/2076205353435701108.html                                       ...

  10. deepin云打印实现连接Windows打印机

    问题的产生:今天给台式机安装deepin系统时,突发奇想能不能给其安装上打印机驱动,让其实现打印功能. 问题的解决方法: 1.在连接打印机的电脑上安装deepin云打印服务端软件,下载地址:https ...