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

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

chan 導致 系統權限 over local tar erro 關閉 oca

在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

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