在Linux上git pull線上倉庫代碼時,出現error: Your local changes to the following files would be overwritten by merge


在Windows上工作時未出現過該問題,於是通過命令:

git diff

查看差異,得到結果:

diff --git a/start_crons.sh b/start_crons.sh
old mode 100644
new mode 100755

這是由Linux嚴格的文件系統權限導致。

通過命令關閉filemode解決:

git config core.filemode false

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM