本文转自:http://yijiebuyi.com/blog/5b55eb51ad49ce41e2de9c85dd4513ca.html

今天获取git线上仓库代码报了这个错误:

zhangzhi@moke:~/code/ktsg-api$ git pull
You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.

错误可能是因为在你以前pull下来的代码没有自动合并导致的.

有2个解决办法:

1.保留你本地的修改

git merge --abort

git reset --merge

合并后记得一定要提交这个本地的合并

然后在获取线上仓库

git pull

2.down下线上代码版本,抛弃本地的修改

不建议这样做,但是如果你本地修改不大,或者自己有一份备份留存,可以直接用线上最新版本覆盖到本地

git fetch --all

git reset --hard origin/master

git fetch

当然还有一个最笨的方法,就是重新clone一份代码,抛弃这个工作目录,哈哈,开玩笑.

You have not concluded your merge (MERGE_HEAD exists) git拉取失败的更多相关文章

  1. Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...

  2. You have not concluded your merge. (MERGE_HEAD exists)。(转)

    自己简直就是一个git小白,碰到问题,一点点的解决吧,可能不太系统,但也只能勤能补拙了 Git本地有修改如何强制更新 本地有修改和提交,如何强制用远程的库更新更新.我尝试过用git pull -f,总 ...

  3. ou have not concluded your merge (MERGE_HEAD exists)

    今天获取git线上仓库代码报了这个错误: zhangzhi@moke:~/code/ktsg-api$ git pull You have not concluded your merge (MERG ...

  4. You have not concluded your merge. (MERGE_HEAD exists)(转)

    Git本地有修改如何强制更新 本地有修改和提交,如何强制用远程的库更新更新.我尝试过用git pull -f,总是提示 You have not concluded your merge. (MERG ...

  5. 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...

  6. Git常用命令及常见报错:You have not concluded your merge (MERGE_HEAD exists)、清理无效的远程追踪分支

    一.常用命令 切换到master分支:git checkout master 查看已有本地及远程分支:git branch -a(先git pull拉下全部数据) 查看远程分支:git branch ...

  7. [转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin mas ...

  8. git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...

  9. git pull 报错 You have not concluded your merge (MERGE_HEAD exists).

    git pull时报错 解决方案:

随机推荐

  1. mysqldump脚本crontab执行失败,但是手动执行成功

    检查备份时发现,cron中定时备份mysql的脚本备份失败,但是手动自行mysql备份脚本却能正常成功 检查cron的环境变量: # cat /etc/crontab ... SHELL=/bin/s ...

  2. 5.翻译:EF基础系列---EF中的上下文类

    原文地址:http://www.entityframeworktutorial.net/basics/context-class-in-entity-framework.aspx EF中的上下文类是一 ...

  3. 《KAFKA官方文档》入门指南(转)

    1.入门指南 1.1简介 Apache的Kafka™是一个分布式流平台(a distributed streaming platform).这到底意味着什么? 我们认为,一个流处理平台应该具有三个关键 ...

  4. Mac下安装mysql8.0.11

    1.下载MySQL Community 版本:8.0.11,本次例子是以dmg安装的方式,下载的文件名为:mysql-8.0.11-macos10.13-x86_64.dmg 下载地址:https:/ ...

  5. jQueryUI modal dialog does not show close button (x) JQueryUI和BootStrap混用时候,右上角关闭按钮显示不出图标的解决办法

    I had this problem and was able to resolve it with the declaration below. $.fn.bootstrapBtn = $.fn.b ...

  6. windows下bash终端--git-bash总汇

    git bash是一个比较好用的终端(win下),但有一些细节需要调整后才好用. 1.比如,登陆后终端的表格,以及个别符号显示为乱码. 解决方法: 1).点击git bash左上角,选择“option ...

  7. Eclipse中如何安装和使用GrepCode插件 (转)

    GrepCode(GC)Eclipse插件允许Eclipse用户在Eclipse IDE中搜索由GrepCode提供的工厂类.本教程介绍如何安装和使用插件.使用Eclipse3.5(Galileo)的 ...

  8. js正则表达式实现手机号码,密码正则验证

    手机号码,密码正则验证. 分享下javascript中正则表达式进行的格式验证,常用的有手机号码,密码等. /** * 手机号码 * 移动:134[0-8],135,136,137,138,139,1 ...

  9. asp.net mvc中的用户登录验证过滤器

    在WEB项目中建立 类:      public class LoginFilter : ActionFilterAttribute     {         public override voi ...

  10. Java Web(八) MVC和三层架构

    今天终于认识到自己的渺小,想起了一句话,不努力机会来了你也抓不住,不要一直想一步登天,一直沉浸在白日梦的美好之中,一步一个脚印,有多大能力做多大的事情,走程序员的这条路,那么我就想去好公司,一切都以进 ...