冲突提示信息
error: Your local changes to the following files would be overwritten by merge:
......
Please, commit your changes or stash them before you can merge.
如果想要和本地代码合并,github代码库和本地代码自动merge,可以用以下命令:
git stash
git pull
git stash pop
然后再用git diff -w查看代码合并情况,如果装了乌龟的话可以直接diff手动解决冲突
如果是想用github最新代码完全覆盖本地的代码,就是说你本地的修改不要了,那可以这样干:
git reset --hard
git pull
这样本地代码就跟github上保持一致了