一,Bug提示情况

今天想在idea上pull主分支上的代码,但由于不懂fetch是什么意思,所以执行了一遍fetch->pull,后来不知道怎么搞的,想再pull一次就提示:You have not concluded your merge (MERGE_HEAD exists).
Exiting because of unfinished merge.

二,Bug解决方法

去百度找了一些相关答案:
2.1 问题所在:fetch是将主分支上的所有的代码都down下来,但不会自动合并。
2.2 解决方案:
① 保存本地代码
② 执行git fetch --all
③ 执行git reset --hard origin/master ----> git reset 把HEAD指向刚刚下载的最新的版本
④pull主分支下的代码
⑤解决冲突,然后提交代码到自己的分支那里

三,Bug解决操作

3.1 执行git fetch --all

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

3.2 git reset --hard origin/master

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

3.3 pull主分支下的代码

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

3.4 解决冲突!!!

解决冲突!!!
解决冲突!!!
解决冲突!!!

3.5 将自己的代码更新到自己分支上

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

【BUG解决】在git上pull时提示You have not concluded your merge. (MERGE_HEAD exists)

下面就可以继续开发了!记得要先备份。避免到时候出了什么差错。

相关文章:

  • 2021-11-27
  • 2021-05-29
  • 2022-12-23
  • 2022-02-19
  • 2022-01-22
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2021-11-06
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-07-03
相关资源
相似解决方案