当前位置:   article > 正文

gti解决pull代码冲突_committing is not possible because you have unmerg

committing is not possible because you have unmerged files. hint: fix them u
场景:

pull代码后冲突:

解决冲突后提交代码报错:

执行 commit报错:

error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm ’
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

解决方法:

If you have fixed the conflicts you need to add the files to the stage with git add [filename], then commit as normal.
就是你手动修改git提示有错误的文件,修改之后,添加有冲突的文件: git add [被修改的冲突文件], 最后,按照普通提交那样,提交有冲突的问题: git commit [修改后的冲突文件] -m “注释内容”

即: 先执行 add命令,在执行commit命令

还有一种方法:

# 在命令上加-f参数
git pull -f 
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/495911
推荐阅读
相关标签
  

闽ICP备14008679号