使用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拉取代碼即可,如圖: