GitHub:克隆成功,但是checkout失败

标签 git github git-svn

我在使用时遇到了一些问题 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/

相关文章:

java - 使用 Android Studio 进行 GitHub 协作

node.js - 为什么yarn install 会 check out github 存储库依赖项,而npm install 却不会?

github - 在 GitHub 中设置 golang 与 Python 一起工作

git - 在 git-svn 项目中使用 git 子模块

git - .gitignore 忽略所有文件,然后递归地允许某种类型的文件

git - 没有 Remote 的嵌套 git 存储库(也称为没有 Remote 的 git 子模块)

c - 在线C项目锻炼?

git - 如何解决 git-svn 索引不匹配问题?

git - 如果有人知道我的 Github 用户名和电子邮件,他们可以提交或推送我项目的文件吗?

git - 如何将远程master分支更改到本地开发分支?