GIT:无效路径“.editorconfig”

问题描述

从 master 克隆项目时出现以下错误

错误:无效路径“.editorconfig” 致命:无法检出工作树 警告:克隆成功,但结帐失败。 您可以使用“git status”检查签出的内容 并使用 'git restore --source=HEAD :/' 重试

下面是我的 .editorconfig 文件中的配置

# editorconfig
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
3
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

解决方法

'.editorconfig'

文件名有一个尾随空格,而且您似乎处于不允许使用此类文件名的图形环境中。

修复它的唯一方法是在 Unix/Linux 操作系统上克隆存储库(尝试 WSL2、docker、虚拟机),修复文件名并提交。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...