用git提交的時候,commit之后提示一個致命錯誤:“fatal: You have not concluded yourmerge (MERGE_HEAD exists).”
原文:https://blog.csdn.net/duyusean/article/details/78347443
這是因為: 以前的pull之后merge失敗, git進入conflict狀態(tài)。也就是說你以前pull下來的代碼沒有自動合并導(dǎo)致的
the conflict wasn't resolved properly before the next pull.
有兩個解決辦法:
1) 保留本地的修改
git merge --abort
git reset --merge
合并后記得一定要提交這個本地的合并
然后在獲取線上倉庫
Don't forget to add and commit the merge.
git pull
2)down下線上代碼版本,拋棄本地的修改
不建議這樣做,但是如果你本地修改不大,或者自己有一份備份留存,可以直接用線上最新版本覆蓋到本地
git fetch --all
git reset --hard origin/master
git fetch