赞
踩
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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。