【问题标题】:GIT : invalid path '.editorconfig'GIT:无效路径'.editorconfig'
【发布时间】:2021-06-18 21:03:34
【问题描述】:

从 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

【问题讨论】:

    标签: git github editorconfig


    【解决方案1】:

    '.editorconfig'

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

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

    【讨论】:

      猜你喜欢
      • 2016-12-31
      • 2022-01-05
      • 1970-01-01
      • 2020-06-12
      • 1970-01-01
      • 1970-01-01
      • 2016-02-29
      • 2018-08-11
      • 2016-12-24
      相关资源
      最近更新 更多