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/ ...
随机推荐
- CA 工作流程
散列函数 Hash 常见的有 MD5, SHA1, SHA256, 该类函数特点是函数单向不可逆,对输入非常敏感,输出长度固定,针对数据的任何修改都会改变散列函数的结果,用于防止信息篡改并验证数据的完 ...
- web移动端,需要清楚设备像素比devicePixelRatio的应用
我们这里所说的devicePixelRatio其实指的是window.devicePixelRatio, 被所有WebKit浏览器以及Opera所支持. 概念 devicePixelRatio ,它是 ...
- mysql数据表的基本操作:表结构操作,字段操作
本节介绍: 表结构操作 创建数据表. 查看数据表和查看字段. 修改数据表结构 删除数据表 字段操作 新增字段. 修改字段数据类型.位置或属性. 重命名字段 删除字段 首发时间:2018-02-18 ...
- Django Admin后台管理用户密码修改
方法一 在Terminal中执行:python manage.py changepassword your_name(其中“your_name”为你要修改密码的用户名),根据提示内容修改即可. 方法二 ...
- POST 400 的一次遭遇
使用Springboot开发接口的过程中,使用POST接收提交的数据. @PostMapping("/input") public void inputData(@RequestB ...
- Python对文件的解压和压缩
zipfile: 解压: import os, zipfile serverzip_path = 'D:\\server.zip' serverzip_target_path = 'd:\\2' f ...
- 【爬坑】远程连接 MySQL 失败
问题描述 远程连接 MySQL 服务器失败 报以下错误 host 192.168.23.1 is not allowed to connect to mysql server 解决方案 在服务器端打开 ...
- php防范
针对 PHP 的网站主要存在下面几种攻击方式: 1.命令注入(Command Injection) 2.eval 注入(Eval Injection) 3.客户端脚本攻击(Script Inserti ...
- May 27. 2018 Week 22nd Sunday
All things come to those who wait. 苍天不负有心人. It is said that those who are patient can see what their ...
- 加一的golang实现
给定一个由整数组成的非空数组所表示的非负整数,在该数的基础上加一. 最高位数字存放在数组的首位, 数组中每个元素只存储一个数字. 你可以假设除了整数 0 之外,这个整数不会以零开头. 输入: [,,] ...