原文鏈接:https://www.cnblogs.com/GyForever1004/p/13702643.html
背景
在 windows 上 clone 內核某分支源碼報錯
1. 報錯詳情
1 $ git reset --hard HEAD 2 error: invalid path 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c'
網絡上查了一下大多是由於文件名格式不支持所至,但筆者嘗試了一番無果。
2. 最終解決辦法
git config core.protectNTFS false
查了下官方手冊,官方原話: If set to true, do not allow checkout of paths that would cause problems with the NTFS filesystem
大概意思是說NTFS有個路徑保護機制,防止文件系統出錯。