Git:代码冲突常见解决方法

来源:互联网 发布:南苑机场 知乎 编辑:程序博客网 时间:2024/05/20 22:35

  在使用git过程中,会遇到各种各样的错误。今天我自己总结一下。(转载请注明出处http://blog.csdn.net/yx1166/article/details/50292113,请尊重他人的劳动成果)

  错误1:error: Your local changes to the following files would be overwritten by merge:
                protected/config/main.activity
                Please, commit your changes or stash them before you can merge.

   解决办法:git stash ,然后重新拉一下代码。我感觉这行命令应该是把那些冲突的文件缓存起来了,拉下代码后,如果想要还原那些冲突文件,就可以用“git stash  pop”命令,此时,可能缓存里面有多份代码,可以用“git stash list”来查看

0 0