git pull 报错:error: You have not concluded your merge (MERGE

    科技2025-06-02  82

    前言

    git pull 拉代码的时候失败报错,在网上找到了解决的方法,记录一下。

    关键字:git pull

    一、问题

    执行拉代码 git pull 的时候报错:

    error: You have not concluded your merge (MERGE_HEAD exists). hint: Please, commit your changes before merging. fatal: Exiting because of unfinished merge.

    二、原因

    是因为拉下来的代码合并的问题而产生的错误(具体问题百度)

    三、解决

    首先中止合并 $:git merge --abort 然后重新合并 $:git reset --merge 最后重新拉取 $:git pull

    四、补充

    如果继续不成功,提示:

    交换文件 "D:/workplace/project/new/tm/.git/.MERGE_MSG.swp" 已存在! 以只读方式打开([O]), 直接编辑((E)), 恢复((R)), 删除交换文件......

    则可以这样解决:点我查看解决方法 或者访问:https://blog.csdn.net/weixin_42816285/article/details/108960108

    五、参考

    参考文章 https://blog.csdn.net/txl910514/article/details/80975166

    总结

    把不熟悉的问题记录下来,提高以后忘记的时候解决问题的效率,或者能帮到大家也是极好的。

    Processed: 0.011, SQL: 8