Fre*_*Ben 6 git git-pull git-gc
运行时git gc,git完成最多99%,然后锁定.我让它整夜运行,它从未完成,似乎没有进展.通常我必须硬重置机器才能恢复,因为一切都锁定了.因为机器变得完全没有反应,我无法得到top或htop统计.
我决定暂时忽略这个问题.然而今天,当运行a时git pull,git决定自动打包存储库,这会触发同样的错误.
这是它被卡住的地方:
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 428464, done.
Delta compression using up to 4 threads.
Compressing objects: 99% (93702/93718)
Run Code Online (Sandbox Code Playgroud)
这是Fedora 17上的Qt 4.8 C++项目.我有8GB的RAM,持有该项目的分区是33G,使用了27G(88%已满).
什么可能导致这个问题?如果机器缺乏运行资源git gc,有没有办法告诉git不要自动打包?
https://help.github.com/articles/ignoring-files
如果你跳过所有生成的二进制文件以及存储库中的dll和重物,那么它应该没有优化问题.
以下是禁用它的方法:
https://www.kernel.org/pub/software/scm/git/docs/git-gc.html
git config --global gc.auto 0
Run Code Online (Sandbox Code Playgroud)
希望有所帮助.