pull 时的冲突
1. 工作区的冲突(与远程仓库)
Please move or remove them before you merge.// 需要手动处理//move 即可2. 暂存区的冲突(与远程仓库)
Please commit your changes or stash them before you merge.// 需要手动处理// stash 或者 commit 即可(不过commit了之后会产生情况3)3.1. 本地仓库的冲突(与远程仓库)3.1CONFLICT(add/add): Merge conflict in file_xxx
Auto-merging file_xxx
Merge made by the 'recursive' strategy.
弹出一个vim窗口,让你输入 merge 信息.(该窗口中的非#开头的都是merge信息)
这次vim窗口关闭后,会创建一个提交,这次提交是一次merge
3.2CONFLICT(add/add): Merge conflict in file_xxx // 需要手动处理
Auto-merging file_xxx
Automatic merge failed; fix conflicts and then commit the result.
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 2 different commits each, respectively.(use "git pull" to merge the remote branch into yours)
You have unmerged paths.(fix conflicts and run "git commit")(use "git merge --abort" to abort the merge)
Unmerged paths:(use "git add <file>..." to mark resolution)
both added: file_xxx
cat file_xxx // aaa 是本地仓库上的,bbb是远程仓库的<<<<<<< HEAD
aaa
=======
bbb
>>>>>>> f48bced1363868fa834c814e393e492c06fe01b6
修改掉 <<和 >>,然后 git add 和 git commit