Git 文件写入错误(设备中没有剩余空间)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20271298/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:23:38  来源:igfitidea点击:

Git file write error (No space left in device)

git

提问by Manoj

I'm encountering this git error while trying to push a local branch. Tried possible ways and followed few SO posts, dint help. Any help is really appreciated.

我在尝试推送本地分支时遇到了这个 git 错误。尝试了可能的方法并遵循了一些 SO 帖子,力所能及的帮助。任何帮助都非常感谢。

remote: error: file write error (No space left on device) remote: fatal: unable to write sha1 file error: unpack failed: unpack-objects abnormal exit

远程:错误:文件写入错误(设备上没有剩余空间)远程:致命:无法写入 sha1 文件错误:解包失败:解包对象异常退出

Thanks.

谢谢。

回答by Josué

I think there is no space left in your remote, check this other post:

我认为您的遥控器没有剩余空间,请查看其他帖子:

Hudson: returned status code 141: fatal: write error: No space left on device

Hudson:返回状态代码 141:致命:写入错误:设备上没有剩余空间

回答by Pete B.

TLDR: run the command:

TLDR:运行命令:

git gc

git gc

That worked for me despite the error seeming like it resides on the server.

尽管错误似乎存在于服务器上,但这对我有用。

回答by fgwe84

I got the error having enough space left on device when I tried to git addlarge files (>1GB). Adding these files to .gitignoresolved it. See also this post:

当我尝试处理git add大文件 (> 1GB)时,出现设备上剩余空间不足的错误。添加这些文件来.gitignore解决它。另请参阅此帖子:

Max file size and max repository size in Git?

Git中的最大文件大小和最大存储库大小?