git gc on machine with quota

心已入冬 提交于 2019-12-04 06:28:59

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.

Looks like the best solution is to ask IT for a bigger quota, though I'm still interested to hear workarounds. Today they were feeling generous, but tomorrow... :)

Peter Cordes

git prune is an excellent suggestion, good call Jefromi.

Another thing you can do is compress your other files ; git gc; decompress.

7z gets amazing compression, but won't preserve hardlinks and Unix owner/group, IIRC. If you have a quota, the files are probably all owned by your account, so no worries on the first score. But the safest is tar c --lzma if you have it, or just tar czf or cjf. If you have a lot of small files, the umm, external(?) fragmentation up to block-size might be significant.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!