Git

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

开发新业务,拉取代码时,路由文件发生冲突,解决此文件冲突后,再次拉取,报错。

Git fetch和Git pull的区别

两者都可以从远程获取最新版本到本地。

  1. Git fetch :只是从远程获取最新版本到本地,不会merge(合并);
$:git fetch origin master   //从远程的origin的master主分支上获取最新版本到origin/master分支上
$:git log -p master..origin/master //比较本地的master分支和origin/master分支的区别
$:git merge origin/master          //合并
  1. Git pull: 从远程获取最新版本并merge(合并)到本地;
$:git pull origin master  //相当于进行了 git fetch 和 git merge两部操作
  1. 实际工作中,可能git fetch更好一些, 因为在merge前,可以根据实际情况决定是否merge。

报错

error: You have not concluded your merge (MERGE_HEAD exists).

原因可能是在以前pull下来的代码自动合并失败。

解决办法一:保留本地的更改,中止合并 -> 重新合并 -> 重新拉取

$:git merge --abort
$:git reset --merge
$:git pull

解决办法二:舍弃本地代码,远端版本覆盖本地版本(慎重)

$:git fetch --all
$:git reset --hard origin/master
$:git fetch

解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).相关推荐

  1. 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). 解决办法一:保 ...

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

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

  3. git pull报错error: You have not concluded your merge (MERGE_HEAD exists).

    输入git pull 显示以下信息 错误:您尚未结束合并(merge_HEAD存在). 提示:请在合并之前提交更改. 致命:由于未完成合并而退出. 原因是因为我没有拉取仓库代码的最新版,然后又上传更改 ...

  4. 【GitHub报错】You have not concluded your merge (MERGE_HEAD exists).解决方法

    git push出现错误: You have not concluded your merge (MERGE_HEAD exists). 原因可能是在以前pull下来的代码自动合并失败. 方法一:保留 ...

  5. git pull指令报错:error: You have not concluded your merge (MERGE_HEAD exists).

    使用git pull 指令时报错:error: You have not concluded your merge (MERGE_HEAD exists). 直接翻译上面的报错信息可知: 错误:您尚未 ...

  6. Git 报错:You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).Please, commit your changes

    Git 报错 在 IDEA 中使用 Git 报错: You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).Please, ...

  7. git拉取报错:You have not concluded your merge. (MERGE_HEAD exists)

    You have not concluded your merge. (MERGE_HEAD exists) 原因 一般出现这种情况是没有完成上次的merge操作,就进行了pull操作,就会报这种错误 ...

  8. Git :error: You have not concluded your merge (MERGE_HEAD exists)

    一.问题截图 二.问题出现原因 合并代码时出现冲突后,直接将冲突文件回退(reset)到上一个版本了,再fecth 后合并就出现上述问题. 三.问题解决 -- (前置条件:确保你将自己修改的内容已经提 ...

  9. error: You have not concluded your merge (MERGE_HEAD exists).解决

    原因可能是在以前pull下来的代码自动合并失败 解决办法:切换到项目文件夹中,使用git命令 舍弃本地代码,远端版本覆盖本地版本(慎重) $:git fetch --all $:git reset - ...

最新文章

  1. html鼠标悬停出现新元素,CSS:我如何将鼠标悬停在一个元素上,并显示另一个元素?...
  2. 卧加加工斜孔怎么计算机械坐标,卧加B轴旋转后坐标怎么计算
  3. 贝塞尔曲线与CAShapeLayer的关系以及Stroke动画
  4. python文本替换 数据库_Python pptx(Power Point)查找和替换文本(ctrl+H)
  5. Daily Scrum 10.24
  6. CRM是什么?我心中理想的CRM形态
  7. 用户强烈反对产品改动,如何应对?
  8. python中词云图是用来描述_python中实现词云图
  9. Linux系统网卡配置方法
  10. 2017.10.9 放棋子 思考记录
  11. 用c++实现简单单链表,双链表,二叉树类
  12. 人工智能应用在会计工作中的优势
  13. python dbf转excel_如何在python中将dbf转换为csv?
  14. Nas性能测试工具-vdbench
  15. MATLAB车道识别与交通标志识别
  16. nacos connect timed out executing XXX
  17. Matplotlib折线图(绘图实例+代码详解)
  18. 高德地图两个不同的的功能合并
  19. 百家号运营技巧:如何发布图集获得高收益呢?
  20. 在win10里修改mysql的root密码

热门文章

  1. 基于HyperLPR的车牌识别
  2. 与六年测试工程师促膝长谈,他分享的这些让我对软件测试工作有了全新的认知~
  3. 微信网页授权并获取用户信息
  4. c语言中(*p)[5]与*P[5]的区别
  5. 一款开源免费的办公套件系统:DzzOffice详细部署
  6. 华米新一代智能可穿戴芯片2020年第四季度量产
  7. 搭建视频会议系统OpenMeetings
  8. wx2540h配置教程_H3C wx3000系列配置
  9. 戴尔将为奔驰多款车型设计专业的车载智能系统
  10. Linux文件系统及文件储存方式