停止git gc - 侵略,这是一件坏事吗? [英] Stopping a git gc --aggressive, is that a bad thing?
问题描述
我在一个非常大的repo(apx 100 gb)上运行了 git gc --aggressive
。它从两天前开始运行,并且在几个小时的时间里,它一直停留在:压缩对象:99%(76496/76777)
如果我 Ctrl - C 过程中,会产生什么后果?我的回购将无法使用?我的直觉说不,但我想要一些意见。谢谢!
git应该始终安全,不会因此而中断。不过,如果您担心,我建议 Ctrl + Z ,然后运行 git fsck --full
确保系统是一致的。
有许多git-config变量可以帮助你的git-gc变得更快。我在一个特定的大型回购库上使用了以下内容,但是还有很多选项可以随机尝试(或仔细研究,无论哪个)。
git config pack.threads 1
git config pack.deltaCacheSize 1
git config core.packedGitWindowSize 16m
git config core.packedGitLimit 128m
git config pack.windowMemory 512m
这些只有在您的问题是内存不足时才有所帮助。
I am running a git gc --aggressive
on a very large repo (apx 100 gb). It's been running since two nights ago, and as of a couple hours, it has been stuck on: "Compressing Objects: 99% (76496/76777)"
If I Ctrl-C the process, what are the consequences? Will my repo be unusable? My intuition says no, but I'd like some opinions. Thanks!
git is supposed to be always safe from interruptions like this. If you are worried, though, I suggest Ctrl+Z and then run a git fsck --full
to make sure the system is consistent.
There are a number of git-config variables which might help your git-gc go faster. I use the following on one particular large repo, but there are many more options to randomly try (or carefully study, whichever).
git config pack.threads 1
git config pack.deltaCacheSize 1
git config core.packedGitWindowSize 16m
git config core.packedGitLimit 128m
git config pack.windowMemory 512m
These only help if your problem is that you are running out of memory.
这篇关于停止git gc - 侵略,这是一件坏事吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!