我正在运行 Ubuntu 18.04,作为 Windows 的子系统。我在多台 PC 上做过这个,从来没有遇到过这个问题。我试着去git clone <repo>,我得到了这个:
Cloning into '<repo>'...
error: chmod on /mnt/c/Users/Efsta/Code/<repo>/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
Run Code Online (Sandbox Code Playgroud)
我尝试了以下方法:
? git config core.fileMode false,这个结果
fatal: not in a git directory
? git config --global core.filemode false
? git config --add --global core.filemode false
似乎没有任何效果。我已经在这里尝试了几个答案,但 WSL 似乎有点棘手。任何人都知道如何解决这个问题?
我也尝试了这个问题中的所有内容:https : //stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-file-mode-chmod-changes,似乎没有任何效果。