场景一 

user0 有新提交

user1 没有pull -> 写新代码 -> pull -> 提示有冲突

 

解决办法一

-> stash save(把自己的代码隐藏存起来) -> 重新pull -> stash pop(把存起来的隐藏的代码取回来 ) -> 代码文件会显示冲突 -> 右键选择edit conficts,解决后点击编辑页面的 mark as resolved ->  commit&push

 

解决办法二(尽量少使用,这种方法的优点是在在原编辑器里处理冲突,代码逻辑看得更清楚一些)

-> stash save(把自己的代码隐藏存起来) -> 重新pull -> stash pop(把存起来的隐藏的代码取回来 ) -> 代码文件会显示冲突 -> 右键选择resolve conflict -> 打开文件解决冲突 -> commit&push

 

 

场景二

user0 有新提交

user1 没有pull -> 写新代码 -> commit&push -> 提示有冲突

 

解决办法一

-> pull -> 代码文件会显示冲突 -> 右键选择edit conficts,解决后点击编辑页面的 mark as resolved ->  commit&push

====

Before update your uncommitted changes were saved to stash. Update is not complete, you have unresolved merges in your working tree Resolve conflicts, complete update and restore changes manually.

解决办法

去将本地还原到线上最新的版本



git.exe pull --progress -v --no-rebase "origin" test

From https://gitee.com/hory/HIS

* branch test -> FETCH_HEAD

= [up to date] test -> origin/test

Auto-merging README.md

CONFLICT (content): Merge conflict in README.md

Automatic merge failed; fix conflicts and then commit the result.