git pull失败:You have not concluded your merge (MERGE_HEAD exists)

git pull时遇到错误:

localhost:~ lipengfei$ git pull
You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.

出现这个错误可能是因为之前PULL下来的代码没有自动合并。 git merge --abort失败后,用以下方法解决,把本地修改另存一份,然后从线上pull下来最新的代码,覆盖本地代码,然后再把本地修改恢复

git fetch --all
git reset --hard origin/master
git pull

转载于:https://my.oschina.net/u/1161990/blog/823331

你可能感兴趣的:(git pull失败:You have not concluded your merge (MERGE_HEAD exists))