error: Your local changes to the following files would be overwritten by merge:

http://blog.csdn.net/zwhfyy/article/details/8625228

Your local changes to the following files would be overwritten by merge

error: Your local changes to the following files would be overwritten by merge:


        app/app.iml
Please, commit your changes or stash them before you can merge.


如果希望保留生產服務器上所做的改動,僅僅併入新配置項, 處理方法如下:



git stash
git pull
git stash pop
然後可以使用git diff -w +文件名 來確認代碼自動合併的情況.


反過來,如果希望用代碼庫中的文件完全覆蓋本地工作版本. 方法如下:


git reset --hard
git pull
其中git reset是針對版本,如果想針對文件回退本地修改,使用
發佈了31 篇原創文章 · 獲贊 43 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章