git status显示“Function not implemented”和“fatal: cannot use .git/info/exclude as an exclude file”。

3

我正在使用gitbash和git版本2.20.1.windows.1。 commitdiffbranch都能正常工作,但是最基本的命令git status失败了。错误信息如下,其中fileAfileB是我的repo中被跟踪的文件:

$ git status
.gitignore: Function not implemented
fileA: Function not implemented
fileB: Function not implemented
fatal: cannot use .git/info/exclude as an exclude file

我在.git/info/exclude.gitignore中没有发现任何异常。

GitHub桌面版显示了正确的status,所以目前这是我的解决办法。

2个回答

17

2019年1月:检查一下这是否与最近的问题1989有关。

禁用fscache,回滚到2.19.1或将存储库移动到本地驱动器可解决该问题。

git config --global core.fscache false

2020年7月更新,正如Rintze Zelle评论中所指出的:

更新到新版Git for Windows of >= v2.21.0 也应该能够解决此问题。
我将 Git 版本从 2.20.1.windows.1 更新到 2.27.0.windows.1 后,不再遇到此错误。


是的,我可以确认将存储库移动到本地驱动器或禁用fscache会使错误消息消失。 - craq
谢谢!这让我疯了。你应该得到你应得的点赞! - BinaryNexus
根据 https://github.com/git-for-windows/git/issues/1989#issuecomment-464802297 的说法,升级到 Git for Windows 的新版本(>= v2.21.0)应该可以解决这个问题。在从 git version 2.20.1.windows.1 升级到 git version 2.27.0.windows.1 后,我不再遇到这个错误了。 - Rintze Zelle
1
@RintzeZelle 谢谢您的反馈。我已将您的评论包含在答案中以增加可见性。 - VonC

0

顺便提一下,我正在使用 git 版本 2.38.1.windows.1,仍然遇到这个问题。 似乎只会在我尝试在包含符号链接(来自 NPM 安装)的目录上运行 git clean -xf 时发生,并且当这些符号链接可能导致对同一目录的循环引用时

dirA -> dirB -> node_modules -> dirA

设置

git config --global core.fscache false

没有帮助。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接