Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.

git报错 Cannot update paths and switch to branch ‘snapshot_mixuse‘ at the same time.

错误如下:

  1. dmj-parent git:(master) git checkout -b snapshot_mixuse --track origin/snapshot_mixuse
  2. fatal: Cannot update paths and switch to branch ‘snapshot_mixuse‘ at the same time.
  3. Did you intend to checkout ‘origin/snapshot_mixuse‘ which can not be resolved as commit?
  4. ?  dmj-parent git:(master) git remote show origin
  5. * remote origin
  6.  Fetch URL: [email protected].superboss.cc:dmj/jxc.git
  7.  Push  URL: [email protected].superboss.cc:dmj/jxc.git
  8.  HEAD branch: master
  9.  Remote branches:
  10.    master          tracked
  11.    snapshot        tracked
  12.    snapshot-item   tracked
  13.    snapshot_mixuse new (next fetch will store in remotes/origin)
  14.    snapshot_wlb    tracked
  15.  Local branches configured for ‘git pull‘:
  16.    master        merges with remote master
  17.    snapshot      merges with remote snapshot
  18.    snapshot-item merges with remote snapshot-item
  19.  Local refs configured for ‘git push‘:
  20.    master        pushes to master        (local out of date)
  21.    snapshot      pushes to snapshot      (local out of date)
  22.    snapshot-item pushes to snapshot-item (up to date)
  23. ?  dmj-parent git:(master)

解决思路:

  1. ?  dmj-parent git:(master) git remote update
  2. Fetching origin
  3. remote: Counting objects: 28, done.
  4. remote: Compressing objects: 100% (22/22), done.
  5. remote: Total 28 (delta 14), reused 0 (delta 0)
  6. Unpacking objects: 100% (28/28), done.
  7. From git.superboss.cc:dmj/jxc
  8. * [new branch]      snapshot_mixuse -> origin/snapshot_mixuse
  9.   275fed2..b289f38  snapshot_wlb -> origin/snapshot_wlb
  10. ?  dmj-parent git:(master) git fetch
  11. ?  dmj-parent git:(master) git checkout -b snapshot_mixuse origin/snapshot_mixuse
  12. Branch snapshot_mixuse set up to track remote branch snapshot_mixuse from origin.
  13. Switched to a new branch ‘snapshot_mixuse‘

Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.

时间: 2024-10-29 16:01:24

Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.的相关文章

Cannot update paths and switch to branch at the same time(转)

当使用git进行操作: git checkout -b local-name origin/remote-name 出现错误: fatal: git checkout: updating paths is incompatible with switching branches.Did you intend to checkout 'origin/remote-name' which can not be resolved as commit? 解决办法: git remote show ori

Cannot update paths and switch to branch at the same time

当使用git进行操作: git checkout -b local-name origin/remote-name 出现错误: fatal: git checkout: updating paths is incompatible with switching branches.Did you intend to checkout 'origin/remote-name' which can not be resolved as commit? 解决办法: git remote show ori

三分钟教你学Git (九) - 新建分支错误

[email protected]$ 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仓库里的指定分支拉取到本地(本地不存在的分支)

摘自:https://www.cnblogs.com/hamsterPP/p/6810831.html 当我想从远程仓库里拉取一条本地不存在的分支时: git checkout -b 本地分支名 origin/远程分支名 这个将会自动创建一个新的本地分支,并与指定的远程分支关联起来. 例如远程仓库里有个分支dev2,我本地没有该分支,我要把dev2拉到我本地: 若成功,将会在本地创建新分支dev2,并自动切到dev2上. 如果出现提示: fatal: Cannot update paths an

Git Tutorial 5 - Branch and Merge

Branch is a very important concept in Git and doing branch is one of the greatest features. It plays like the concept of context when you're working on it. You can have multiple branches in your repo, and in a time you're working in only one of them.

Git Step by Step – (5) Git分支(branch)

在前面两盘文章中介绍了Git的基本原理,都是理论知识.这篇文章我们再次回到实践中,看看Git分支(branch)的使用. 在代码版本控制工具中,都会有branch的概念.刚开始建立版本仓库的时候,我们只有一个主分支(master branch),我们不可能把日常的新功能开发.代码优化以及bug修复等概念工作全都放在主分支上,这样会使主分支很难维护.这就是为什么会有branch. 分支的创建及删除 分支的创建 在Git中,branch的创建很简单,我们可以通过下面的命令创建一个"release-1

Git手册

GitUserManualChinese - Robin Wiki GitUserManualChinese Git 用户手册(1.5.3 及后续版本适用) 翻译: 罗峥嵘 (Robin Steven) < [email protected] > 英文版本: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html Contents Preface 前言 Chapter 1. Repositories and Branch

svn 在linux 下的一些常用命令

最近在Linux系统下玩一些svn的东西,感觉脑袋很乱, 于是整理了一下一些初学者必须弄明白的基本命令: 1. svn --version: 查看Linux系统下的svn client版本. Client端的版本应该与server端的版本保持一致,否则会出现一些bug, 比如说可能会出现不能svn commit的情况(真心花了好长时间才发现这个问题,真心是经验之谈,). 在client电脑上查看svn server 的版本的方法是在浏览器上输入"http://www.SERVER_NETWORK

Git Sheet

Create Clone an existing repository git clone ssh://[email protected]/repo.git Clone an existing repository and all its sub-modules recursively git clone --recursive ssh://[email protected]/repo.git Create a new local repository git init Local Change