天天看點

git checkout master 報錯 error: invalid path ‘檔案路徑‘

git checkout master 報錯 error: invalid path ‘檔案路徑’

D:\www\huanan>git checkout master
error: invalid path 'static/upload/demand/0aafa0089c17a039cd957217d40780d4.'
error: invalid path 'static/upload/demand/1d6a0e50d74ccb19d022c76aa059cc5e.'
error: invalid path 'static/upload/demand/50a96a007b556e62da82bef5f4e96c0f.'
error: invalid path 'static/upload/demand/5b6b502c9b8a3ec7794e62a3703a6274.'
error: invalid path 'static/upload/demand/98f4c100d0ef1262f644298eff0d62cc.'

           

參考:https://www.cnblogs.com/ericte/p/14006483.html

解決方法:

git config core.protectNTFS false

查了下官方手冊,官方原話: If set to true, do not allow checkout of paths that would cause problems with the NTFS filesystem

大概意思是說NTFS有個路徑保護機制,防止檔案系統出錯。

git