1. 程式人生 > >git:Git fetch和git pull的區別, 解決Git報錯:error: You have not concluded your merge (MERGE_HEAD exists).

git:Git fetch和git pull的區別, 解決Git報錯:error: You have not concluded your merge (MERGE_HEAD exists).

pre ret mas -h ruby error you origin 分支

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).