有时候在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. [国家集训队2009]小Z的袜子

    题目:洛谷P1494.BZOJ2038. 题目大意:给你一列袜子的颜色,每次要你求从区间$[L,R]$内随机选两个袜子颜色相同的概率.解题思路:首先,对于某个特定区间$[L,R]$,它的概率是$\fr ...

  2. linux下如何查看cpu信息

    linux的cpu信息可以从文件中cpuinfo读取. 执行命令: # cat  /proc/cpuinfo   我们一般看到的processor是逻辑核. 它的计数是从0开始的,例如这里看到的是31 ...

  3. 【【henuacm2016级暑期训练】动态规划专题 D】Writing Code

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 二维费用背包. f[i][j][k] 前i个人,写了j行,bug不超过k的方案数. 可以把每个人看成是一个物品. 它可以无限拿.然后 ...

  4. 洛谷——P2483 [SDOI2010]魔法猪学院

    https://www.luogu.org/problem/show?pid=2483 题目描述 iPig在假期来到了传说中的魔法猪学院,开始为期两个月的魔法猪训练.经过了一周理论知识和一周基本魔法的 ...

  5. hdu 1722 Cake 数学yy

    题链:http://acm.hdu.edu.cn/showproblem.php? pid=1722 Cake Time Limit: 1000/1000 MS (Java/Others)    Me ...

  6. CF 567C(Geometric Progression-map)

    C. Geometric Progression time limit per test 1 second memory limit per test 256 megabytes input stan ...

  7. USACO runaround

    /* ID:kevin_s1 PROG:runround LANG:C++ */ #include <iostream> #include <cstdio> #include ...

  8. MySQL超级简明基本操作攻略,给自己看(一)

    系统:Ubuntu 14.04 LTS 安装: apt-get install mysql //安装数据库 apt-get install mysql-workbench //安装图形界面 使用: 启 ...

  9. swift -函数、函数指针

    // // main.swift // FunctionTest-04 // import Foundation println("函数測试!") testFunction() / ...

  10. [Android] Android开发优化之——对界面UI的优化(2)

    在Android应用开发过程中,屏幕上控件的布局代码和程序的逻辑代码通常是分开的.界面的布局代码是放在一个独立的xml文件中的,这个文件里面是树型组织的,控制着页面的布局.通常,在这个页面中会用到很多 ...