git gc机器上的配额 [英] git gc on machine with quota

查看:146
本文介绍了git gc机器上的配额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题,我试图在带有配额的机器上运行 git gc 。 Pre-gc,我大约有18GB的使用量,几乎所有这些都是我克隆的git存储库。我的磁盘限制是25GB。在 git gc 操作期间,足够的临时文件被写入磁盘以达到我的限制,从而导致 git gc 操作我可以在失败的操作后删除 .git / objects / pack / tmp_pack _ * 并获得回到18GB的使用,但我真的很想完成 git gc 并回收一些性能。


是否有一些我可以使用的奇特选项(或一系列其他git命令)不涉及先写入> 7GB的临时文件到磁盘? >解决方案

gc 的哪一部分对你很重要?您可以尝试分别运行 git-prune git-repack 部分。使用 git-prune 时,请确保使用 - expire 选项指定截止日期。如果您的回购协议中有大量的松散对象,首先将它们排除在外将有所帮助。*

使用 git-repack ,你可能会混淆深度和窗口设置,以获得足够小的空间以便在你拥有的空间内运行。



*我没有假装完全理解所涉及的所有问题,但我注意到在git-gc代码中重新包装之后修剪


Simple question, I'm trying to run git gc on a machine with a quota. Pre-gc, I'm at about 18GB of usage, almost all of which is my cloned git repository. My disk limit is 25GB. During the git gc operation, enough temporary files are written to disk to hit my limit and thus cause the git gc operation to fail.

I can delete the .git/objects/pack/tmp_pack_* after the failed operation and get back down to 18GB of usage, but I'd really like to actually complete git gc and reclaim a little performance.

Is there some fancy option (or series of other git commands) that I can use that doesn't involve first writing >7GB of temporary files to the disk?

解决方案

Which part of the gc is important for you? You could try running the git-prune and git-repack parts separately. With git-prune, be sure and specify a cutoff date with the --expire option. If there are a ton of loose objects in your repo, getting them out of the way first would be helpful.*

With git-repack, you can perhaps mess with the depth and window settings to get something small enough to run within the space you have.

* I don't pretend to fully understand all the issues involved, but I do notice that the prune comes after the repack in the git-gc code.

这篇关于git gc机器上的配额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆