Pull is not possible because you have unmerged files
Pull is not possible because you have unmerged files.
在git pull的过程中,如果有冲突,那么除了冲突的文件之外,其它的文件都会做为staged区的文件保存起来。
重现:
$ git pull
A Applications/Commerce/BookingAnalysis.java
A Applications/Commerce/ClickSummaryFormatter.java
M Applications/CommerceForecasting/forecast/Forecast.java
A Applications/CommerceForecasting/forecast/ForecastCurveProviderCategory.java
M Applications/CommerceForecasting/forecast/ForecastProvider.java
M Applications/CommerceForecasting/forecast/InputPropertyItem.java
......
A Applications/LocalezeImporter/com/tripadvisor/feeds/SingleMenuLocalezeMatcher.java
A Applications/LocalezeImporter/com/tripadvisor/feeds/TypeCategory.java
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
通过git status你会发现下面古怪的事情:
zhonghua@pts/ttys000 $ git status
# On branch sns
# Your branch and 'snsconnect/sns' have diverged,
# and have 1 and 52 different commit(s) each, respectively.
#
# Changes to be committed:
#
# new file: src/config/features_daodao.ini
# new file: src/config/services.xml
# new file: src/config/svnroot/hooks/mailer.conf
# new file: src/config/svnroot/hooks/mailer.py
# new file: src/config/svnroot/hooks/post-commit
# new file: src/config/svnroot/hooks/pre-commit
# new file: src/config/svnroot/hooks/prerelease_notifications.py
# new file: src/config/svnroot/hooks/run_checks.py
…….
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# _build/
# css/combined/
# css/gen/
# daodao-site.patch
# daodao-site.patch1
# js/combined/
# js/gen/
# lib/weibo/
# src/bin/
Pull is not possible because you have unmerged files.
解决:
1.pull会使用git merge导致冲突,需要将冲突的文件resolve掉 git add -u, git commit之后才能成功pull.
2.如果想放弃本地的文件修改,可以使用git reset --hard FETCH_HEAD,FETCH_HEAD表示上一次成功git pull之后形成的commit点。然后git pull.
注意:
git merge会形成MERGE-HEAD(FETCH-HEAD) 。git push会形成HEAD这样的引用。HEAD代表本地最近成功push后形成的引用。
Pull is not possible because you have unmerged files的更多相关文章
- git报错:Pull is not possible because you have unmerged files解决方法
在git pull的过程中,如果有冲突,那么除了冲突的文件之外,其它的文件都会做为staged区的文件保存起来. 重现: $ git pull A Applications/Commerce/B ...
- git冲突Pull is not possible because you have unmerged files
本地的push和merge会形成MERGE-HEAD(FETCH-HEAD), HEAD(PUSH-HEAD)这样的引用.HEAD代表本地最近成功push后形成的引用.MERGE-HEAD表示成功pu ...
- git上传到版本库报错:Pull is not possible because you have unmerged files(已解决)
问题所在:操作次数太多,第一次报错之删掉了.git并没有删除下面两个文件 才报了题述错误. 解决办法: 将这三个文件都删除在重新运行所有指令.
- pod install Pull is not possible because you have unmerged files.
http://stackoverflow.com/questions/21474536/podfile-gives-an-error-on-install A bug was found in lib ...
- IDEA中使用git合并分支的过程报错:cant checkout because of unmerged files
使用idea的git插件控制代码分支合并时,由于操作不当,报错了,控制台报错如下: cant checkout because of unmerged files,you have to resolv ...
- git合并的时候,冲突问题Merging is not possible because you have unmerged files
在做项目工作的时候,同事修改了代码一个cpp代码,我同样也修改了代码,两人代码冲突了,提交之后,他代码git自动合并,并提示: [master| MERGEING]$ git merge my_new ...
- 解决git pull出现: Your local changes to the following files would be overwritten by merge: ...的问题
今天在服务器上git pull是出现以下错误: error: Your local changes to the following files would be overwritten by mer ...
- git pull 错误:The following untracked working tree files would be overwritten by merge
错误描述: $ git pull origin alphaFrom https://github.com/shirley-wu/HeartTrace * branch alpha ...
- Git pull error: Your local changes to the following files would be overwritten by merge:
联合开发,遇上的一个问题,果然,在此验证了百度的不靠谱,是谷歌出的答案...... stackoverflow上有解决方案,链接:http://stackoverflow.com/questions/ ...
随机推荐
- 洛谷P4591 [TJOI2018]碱基序列(hash dp)
题意 题目链接 Sol \(f[i][j]\)表示匹配到第\(i\)个串,当前在主串的第\(j\)个位置 转移的时候判断一下是否可行就行了.随便一个能搞字符串匹配的算法都能过 复杂度\(O(|S| K ...
- iPhone X手机投屏电脑无线连接教程
iPhone X手机是一款非常有气场的手机,独特的设计,展现手机的独特魅力,手机外观让人一眼就爱上,手感也是超级的舒适,真的是堪称完美,但是iPhone X手机投屏电脑怎么无线连接呢? 使用工具: 电 ...
- 我写的.net相关的文章
此文正在更新中... 广州.net俱乐部相关 复活广州.net俱乐部 office365的开发者训练营,免费,在微软广州举办 被低估的.net(上) - 微软MonkeyFest 2018广州分享会活 ...
- Android为TV端助力 自定义动画
android自定义动画注意是继承Animation,重写里面的initialize和applyTransformation,在initialize方法做一些初始化的工作,在applyTransfor ...
- django 与 Vue 的结合使用说明
1.第一步有一个Django项目 先是创建一个Django项目 django-admin startproject demo 然后创建一个application应用 python manage.py ...
- Android性能优化9-ANR完全解析
1.什么是ANR 在Android上,如果你的应用程序有一段时间响应不够灵敏,系统会向用户显示一个对话框,这个对话框称作应用程序无响应(ANR:Application Not Responding)对 ...
- Markdown:常用语法
1.标题 说明:一共可以6级标题,几级几个# 一级标题 #一级标题 2.代码 用前后扩上 Hello World! 3.代码块 用前后扩上 Hello World! 4.加粗 加粗了 **加粗了** ...
- 在微信小程序中使用LeanCloud(一)
之前学习了微信小程序前端,使用到LeanCloud线上数据库 [传送门].作为一个前端开发人员,了解后端及数据库是学习工作的需要. LeanCloud直接登录,未注册直接创建账户.它是一款免费的线上数 ...
- replace函数使用方法
Replace函数的含义~ 用新字符串替换旧字符串,而且替换的位置和数量都是指定的. replace函数的语法格式 =Replace(old_text,start_num,num_chars,new_ ...
- vim 基础命令大全
VIM命令大全 光标控制命令 命令 光标移动h 向左移一个字符j 向下移一行k ...