GitHub 克隆给出“文件名太长”

Geo*_*eev 7 filenames github

当我通过 GitHub Desktop 克隆我的存储库时,它会抛出错误,指出有一个文件名称太长,我知道文件限制是 255,我从 regedit 和策略编辑器禁用了它,但问题仍然出现,我不知道是什么去做

Geo*_*eev 22

对于任何想知道如何解决这个问题的人,我找到了一种方法!转到 GitHub 桌面文件夹 -> app -> resources -> app -> git -> mingw64 -> etc -> gitconfig ,然后在 [core] 部分下添加此字段“longpaths = true”:)

  • 我使用的文件路径是 C:\Users\myuser\AppData\Local\GitHubDesktop\app-2.8.0\resources\app\git\etc 其他答案中提到的 git shell 命令不起作用 (5认同)
  • +每次更新GitHub Desktop都会出现这个问题! (2认同)
  • 在 git bash 中写入命令: git config --global core.longpaths true https://github.com/desktop/desktop/issues/8023 (2认同)

小智 9

转到 GitHub 桌面文件夹 -> 应用程序 -> 资源 -> 应用程序 -> git -> 等 -> gitconfig

在 [core] 部分下添加此字段“ longpaths = true

对于我的情况:

路径是:

C:\Users\username\AppData\Local\GitHubDesktop\app-3.0.7\resources\app\git\etc
Run Code Online (Sandbox Code Playgroud)

并更新了文件(gitconfig)格式:

[core]
    symlinks = false
    autocrlf = true
    fscache = true
    longpaths = true
Run Code Online (Sandbox Code Playgroud)