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的更多相关文章

  1. git报错:Pull is not possible because you have unmerged files解决方法

    在git pull的过程中,如果有冲突,那么除了冲突的文件之外,其它的文件都会做为staged区的文件保存起来. 重现: $ git pull A    Applications/Commerce/B ...

  2. git冲突Pull is not possible because you have unmerged files

    本地的push和merge会形成MERGE-HEAD(FETCH-HEAD), HEAD(PUSH-HEAD)这样的引用.HEAD代表本地最近成功push后形成的引用.MERGE-HEAD表示成功pu ...

  3. git上传到版本库报错:Pull is not possible because you have unmerged files(已解决)

    问题所在:操作次数太多,第一次报错之删掉了.git并没有删除下面两个文件 才报了题述错误. 解决办法: 将这三个文件都删除在重新运行所有指令.

  4. 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 ...

  5. IDEA中使用git合并分支的过程报错:cant checkout because of unmerged files

    使用idea的git插件控制代码分支合并时,由于操作不当,报错了,控制台报错如下: cant checkout because of unmerged files,you have to resolv ...

  6. git合并的时候,冲突问题Merging is not possible because you have unmerged files

    在做项目工作的时候,同事修改了代码一个cpp代码,我同样也修改了代码,两人代码冲突了,提交之后,他代码git自动合并,并提示: [master| MERGEING]$ git merge my_new ...

  7. 解决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 ...

  8. 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 ...

  9. Git pull error: Your local changes to the following files would be overwritten by merge:

    联合开发,遇上的一个问题,果然,在此验证了百度的不靠谱,是谷歌出的答案...... stackoverflow上有解决方案,链接:http://stackoverflow.com/questions/ ...

随机推荐

  1. js 账单打印并分页

    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding= ...

  2. arcgis在折点处打断并建立网络分析(最短路径等问题)

    目的:GIS网络分析用于对段路径等问题.这里仅仅讲述如何建立网络分析. 网络建立前必须满足以下条件 1.要素文件在节点处打断(本文下面会叙述) 2.要素文件在地理数据库里的数据集里(一般是这样) 3. ...

  3. Implemented Energy-Conserving Hair Scattering Model from Weta Digital

    I used to implement the Energy-Conserving Hair Scattering Model as the pre-calculation program, so t ...

  4. SQL Server的优化器会缓存标量子查询结果集吗

    在这篇博客"ORACLE当中自定义函数性优化浅析"中,我们介绍了通过标量子查询缓存来优化函数性能: 标量子查询缓存(scalar subquery caching)会通过缓存结果减 ...

  5. mssql sqlserver in 关键字在值为null的应用举例

    转自:http://www.maomao365.com/?p=6873 摘要: 下文通过案例分析in 关键字在值为null的应用举例, 分析出not in关键字在null值产生的异常信息 如下所示: ...

  6. 深入了解IOC

    老师在简书写的一篇博客 https://www.jianshu.com/p/79f8331e1f24

  7. Pyqt5+python+ErIC6+QT designer

    Eric6安装及配置 https://blog.csdn.net/weixin_41656968/article/details/80253012 Python3.6+PyQt5+Eric6.0环境配 ...

  8. win10同时安装 office2016和visio2016

    一.下载镜像文件 因为office 2016和 visio2016 镜像文件是一样的,只是名称不一样,所以只需要下载一个即可. 二.下载Office 2016 Deployment Tool工具 到微 ...

  9. Git&GitHub

    Git是一个开源的分布式版本控制系统,可以有效.高速地处理从很小到非常大的项目版本管理.  Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软 ...

  10. LeetCode算法题-Number of Segments in a String(Java实现)

    这是悦乐书的第226次更新,第239篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第93题(顺位题号是434).计算字符串中的段数,其中段定义为非空格字符的连续序列.请注 ...