我在使用时遇到了一些问题
git clone
。文件下载到我本地的 git 文件夹中。运行命令
git checkout -f HEAD
给我-
错误:
'The unable to write new index file error caused by the lack of disk space'.
我已经从我的计算机中手动删除了大文件,但仍然出现相同的错误。
Cloning into 'ffmpeg'...
remote: Counting objects: 7890, done.
remote: Compressing objects: 100% (4412/4412), done.
Receiving objects: 100% (7890/7890), 299.75 MiB | 24.19 MiB/s, done.
remote: Total 7890 (delta 3346), reused 7846 (delta 3317)
Resolving deltas: 100% (3346/3346), done.
Checking out files: 100% (7019/7019), done.
fatal: unable to write new index file
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
最佳答案
对我来说,这是由于文件名很长,并且做了一个简单的配置就解决了这个问题,如下所示
git config --system core.longpaths true
关于GitHub:克隆成功,但是checkout失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22041752/