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 origin

git remote update

git fetch

git checkout -b local-name origin/remote-name

http://www.cnblogs.com/iminic/p/4398265.html

时间: 2024-12-20 02:22:29

Cannot update paths and switch to branch at the same time(转)的相关文章

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. 错误如下: dmj-parent git:(master) git checkout -b snapshot_mixuse --track origin/snapshot_mixuse fatal: Cannot update paths and switch to branch 'snapshot_mixuse' at the s

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