码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-04-13 21:20:24      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:word   margin   知识库   微软雅黑   span   clone   and   otto   eset   

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)(转)

标签:word   margin   知识库   微软雅黑   span   clone   and   otto   eset   

原文地址:http://www.cnblogs.com/lansan0701/p/6705747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!