使用git pull拉取代码时报如下错误:
Your local changes to the following files would be overwritten by merge:
project.config.json
Please commit your changes or stash them before you merge.
如图:
原因:本地修改了一些文件,远程仓库中的这些文件也做了更改,两个文件中的内容不一致
解决方法:取消本地所有更改,命令:git stash
git stash #把所有没有提交的修改暂存到stash里面。可用git stash pop回复
如图:
然后再git pull拉取代码即可,如图: