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

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

时间:2017-08-23 18:22:04      阅读:7991      评论:0      收藏:0      [点我收藏+]

标签:strong   top   解决办法   etc   print   csdn   版本   check   span   

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

 

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

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

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

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


7、强行切换分支

git checkout -f origin/master

8.从新拉入
git fetch --all

 

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

标签:strong   top   解决办法   etc   print   csdn   版本   check   span   

原文地址:http://www.cnblogs.com/achengmu/p/7419445.html

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