you need to resolve your current index first 解决办法
来源:互联网 发布:手机开淘宝店怎么装修 编辑:程序博客网 时间:2024/06/05 15:51
见 : http://blog.csdn.net/wenwenxiong/article/details/47813277
从一个分支A切换到另一个分支B后,对切换后的B分支进行pull操作,因为pull操作实际上包含了fetch+merge操作,在执行 merge操作时,由于很长时间没有对B分支执行过pull/merge操作,本地的B分支库与remote中的B分支库中的差异很大(且这些差异是其他 同事开发的文件),merge时产生冲突,使得B分支的状态为merging,其实是指merge失败,还停留在merge状态,也不能执行pull操 作。这时没有解决冲突,而是从B分支上执行checkout/switchto操作,试图再切换其他分支时,报:
[plain] view plaincopy在CODE上查看代码片派生到我的代码片
…….java : needs merge
…….java : needs merge
…….java : needs merge
error : you need to resolve your current index first
的错,google了半天,终于在stackoverflow上找到了答案,大题意思是:merge失败,有conflicts没解决,可以:
1、解决conflicts后再次执行merge;
2、回退到merge前
恩,既然merge冲突是其他同事的文件,我不需要去resolve conflicts,那就退回merge前吧,单纯的改我的文件再push吧,执行以下代码:
git reset --merge
搞定!
顺便贴下stackoverflow上的链接:
http://stackoverflow.com/questions/6006737/git-merge-errors
- you need to resolve your current index first 解决办法
- you need to resolve your current index first 解决办法
- you need to resolve your current index first 解决办法
- error: you need to resolve your current index first
- You need to modify your application to build with a manifest:R6034错误解决办法
- ubuntu : you may need to re-run your boot loader[grub] 解决办法
- why do you need ./ to execute programs in current directory?
- MacOS出现 You need to restart your computer....错误
- Everything You Need to Know About Rooting Your Android Phone
- You need to scale your work up and out
- iOS开发:[!] You need to register a session first.
- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
- iOS通知 you still need to add "remote-notification" to the list of your supported UIBackgroundModes
- You may need to configure your browser or application to trust the Charles Root Certificate.
- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
- All you need to know about tethering with your Android device
- you need to have ldconfig in your PATH env when enabling luajit
- centos下chrome启动报错:Most likely you need to configure your SUID sandbox correctly
- 安装配置laravel遇到的两个坑
- STS之Alt+/和Ctrl+Shift+O快捷键失效
- 机器学习中的数学(7)——PCA的数学原理
- SpringMVC ajax传值问题
- 基于react16 webpack3 搭建前端spa基础框架 react-router的4种异步加载方式
- you need to resolve your current index first 解决办法
- Android 8.0系统上使用WindowManager添加view的一个问题
- 打印数字图形(函数专题)
- 如何打印输出64位整形
- python2.7.11-configparser-报错:File contains no section headers.
- @RequestMapping(value = "", produces = "application/json")
- GIT 解决冲突
- Heapster -- Kubernetes Dashboard集成Heapster
- LabVIEW学习