命令行git pull产生冲突后,手工编辑冲突文件并保存,之后再执行git add -u命令添加变化的文件,再commit并push即可。具体参考如下文章
When there is a merge conflict, you MUST resolve it first. (well maybe you can run git merge --abort to revert).
So the process is you open your conflicting file, you look for the conflict, resolve it (edit the conflicting lines), then save your file, add it (using git add -u) and commit it.
Then you can work on a clean work directory.
By the way, a conflict probably looks like:
<<<<<<< yours:sample.txt Conflict resolution is hard;
let‘s go shopping.
Git makes conflict resolution easy.
theirs:sample.txt reference: http://www.kernel.org/pub/software/scm/git/docs/git-merge.html
时间: 2024-10-04 07:50:55