有时候在git中checkout -b 出现如下报错





$ git checkout -b test --track origin/master

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

Did you intend to checkout 'origin/master' which can not be resolved as commit?





解决方法





git remote -v





git fetch origin





最后执行自己的git checkout -b

git checkout -b 报错的更多相关文章

  1. git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git

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

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

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

  3. git同步遇到报错

    git同步遇到报错 “fatal: unable to access ‘https://github.com/ruanwenwu/newp.git/‘: Peer reports incompatib ...

  4. git https 请求报错 504

    git https 请求报错 504 原因可能是因为设置了代理,ubuntu/deepin 系统可以检查 /etc/profile ~/.bashrc 内有没有设置 https 的代理. 有的话,去掉 ...

  5. git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompatible or unsupported protocol version.”

    git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompat ...

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

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

  7. git pull冲突报错

    修改代码后在git pull报错: error: Your local changes to the following files would be overwritten by merge: xx ...

  8. Git提交代码报错Git push error:src refspec XXX matches more than one解决方案

    Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...

  9. git statsh命令报错解决

    git stash命令主要用于当在一个分支的开发工作未完成,却又要切换到另外一个分支进行开发的时候,除了commit原分支的代码改动的方法外,提供暂存代码的方式. git stash命令参考这篇:ht ...

随机推荐

  1. python异常处理,多线程,多进程

    什么是异常? 异常即是一个事件,该事件会在程序执行过程中发生,影响了程序的正常执行. 一般情况下,在Python无法正常处理程序时就会发生一个异常. 异常是Python对象,表示一个错误. 当Pyth ...

  2. jvm 虚拟机参数_堆内存分配

    1.参数 -XX:+PrintGC 只要遇到 GC 就会打印日志 -XX:+UseSerialGC 配置串行回收器 -XX:+PrintGCDetails 查看详细信息,包括各个区的情况 -XX:+P ...

  3. selenium的报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class names not permitted

    报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class ...

  4. poj1961--Period(KMP求最小循环节)

    Period Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 13511   Accepted: 6368 Descripti ...

  5. yii自己定义CLinkPager分页

    在components中自己定义LinkPager.并继承CLinkPager 代码例如以下: <? php /** * CLinkPager class file. * * @author l ...

  6. 安卓 使用Gradle生成正式签名apk文件

    1. 进入app中的build.gradle下面进行配置 2.进入Gradle下面选择clean和assembleRelese,双击 3.生成成功,前往查看 4.加密更安全

  7. css实现左右两端对齐均匀排列 text-align: justify

    1.实现一行文字的两端对齐均匀排列 为了实现效果只是加上一个text-align: justify;是没效果的.所以需要加上一个空标签<span><i>都可以,也可以用伪类来写 ...

  8. Maven配置文件中配置指定JDK版本

    1. 在setting.xml文件中的<profiles>标签加入如下配置: <profile> <id>jdk-1.8</id> <activa ...

  9. python面向对象的成员、属性等

    #类成员: #字段 self.xy =qq . xy=qq #普通字段 (保存在对象里面) #直接通过点(.)+ 字段 进行调用 #静态字段 (保存在类里面) #静态字段属于类,在内存只保留一份 . ...

  10. 批量kill 某个用户session

    SELECT 'alter system kill session '''||SID || ',' || SERIAL#||''';'   FROM V$SESSION  where username ...