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

Posted 阑珊的测试成长之路

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了You have not concluded your merge. (MERGE_HEAD exists)(转)相关的知识,希望对你有一定的参考价值。

Git本地有修改如何强制更新

 

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

我需要放弃本地的修改,用远程的库的内容就可以,应该如何做?傻傻地办法就是用心的目录重新clone一个,正确的做法是什么?

正确的做法应该是:

git fetch --all

git reset --hard origin/master

git pull

注:git fetch 只是下载远程的库的内容,不做任何的合并;

git reset 把HEAD指向刚刚下载的最新的版本。

 

以上是关于You have not concluded your merge. (MERGE_HEAD exists)(转)的主要内容,如果未能解决你的问题,请参考以下文章

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

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

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

Git提示You have not concluded your merge. (MERGE_HEAD exists)

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

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