Git问题:Cannot update paths and switch to branch 'dev' at the same time.
来源:互联网 发布:cpu淘宝e5水多深 编辑:程序博客网 时间:2024/04/29 13:41
在创建远程分支时,发生了下面的错误:
$ git checkout -b dev origin/devfatal: Cannot update paths and switch to branch 'dev' at the same time.Did you intend to checkout 'origin/dev' which can not be resolved as commit?
上网搜了好多资料都没能解决,最后到了StackOverflow
上查到了答案:链接
翻译:(勿喷)
正如我在“Get new upstream branch with git”中提到的那样,你可以尝试一下下面的命令:
# let's create a new local branch first#我们来创建一个新的本地分支git checkout -b iss53# then reset its starting point#然后重置它的起始点git reset --hard origin/iss53
确保运行git fetch origin
命令后原创跟踪的分支origin/iss53
要存在。
origin/iss53
意味着origin
索引的远程仓库有iss53
分支。
如果原创仓库中没有origin/iss53
这个分支的话,你只需创建一个本地分支iss53
,然后将它推送到远程仓库即可:
git push -u origin iss53
这样的话就会在本地的分支iss53
和原创跟踪的分支origin/iss53
之间建立一个联系。
1 0
- Git问题:Cannot update paths and switch to branch 'dev' at the same time.
- clone 远程分支 Cannot update paths and switch to branch 'dev' at the same time. Did you intend to checko
- git checkout -b时fatal: Cannot update paths and switch to branch '' at the same time.解决方案
- fatal: Cannot update paths and switch to branch 'gitlab' at the same time.
- Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.
- Cannot update paths and switch to branch at the same time
- fatal: Cannot update paths and switch to branch 'master' at the same time.
- Using MERGE in SQL Server to insert, update and delete at the same time
- how to play music and record from the mic at the same time?
- How to add css class and id in @Html.TextBox mvc4 at the same time
- mysqld_safe Can't log to error log and syslog at the same time.
- Read and write a FileStream at the same time
- C++0x : Inefficient way to perform trivial named args and default args at the same time
- Git 中一些问题 : refusing to update checked out branch
- MAKE the opencv3.1 and the opencv-contrib at the same time
- My solution to:MySQL triggers cannot update the same row that the trigger is assigned to.
- abercrombie france evils. At the same time
- 53. A man can't spin and reel at the same time. 一心不能二用
- Map集合排序
- Spring MVC dropdown box example
- Ubuntu Server 添加/删除/修改用户
- Unity3D笔记第十八天——编辑器的拓展
- 神奇的数据建模框架JSONModel
- Git问题:Cannot update paths and switch to branch 'dev' at the same time.
- httpclient4 post 以json方式传参数
- 关于矩阵的用法
- Scheme 博客收藏
- Unity3D笔记第十九天——项目优化策略
- Android,隐藏输入法
- Spring MVC hidden value example
- 构造函数为什么不能是虚函数
- TSM恢复ORACLE数据库速度极慢的问题。