git error:invalid path问题解决(win下)(转)

背景

在 windows 上 clone 内核某分支源码报错

报错详情

$ git reset --hard HEAD
error: invalid path 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c'

网络上查了一下大多是由于文件名格式不支持所至,但笔者尝试了一番无果。

最终解决办法

git config core.protectNTFS false

查了下官方手册,官方原话:

If set to true, do not allow checkout of paths that would cause problems with the NTFS filesystem

大概意思是说NTFS有个路径保护机制,防止文件系统出错。


原文:https://www.cnblogs.com/zackary/p/13702643.html


Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to 隔窗听雨
Great! Next, complete checkout for full access to 隔窗听雨
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.
豫ICP备19045256号-1