问题描述
从 master 克隆项目时出现以下错误:
错误:无效路径“.editorconfig” 致命:无法检出工作树 警告:克隆成功,但结帐失败。 您可以使用“git status”检查签出的内容 并使用 'git restore --source=HEAD :/' 重试
# 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、虚拟机),修复文件名并提交。