gitgit-pullgit-gc

git gc and git pull locks up machine and never finishes


When running git gc, git gets up to 99% complete and then locks up. I let it run all night and it never finished, and did not seem to progress. Generally I have to hard-reset the machine to recover because everything locks up. Because the machine becomes completely unresponsive I can't get top or htop statistics.

I decided to ignore that problem for awhile. Today however, when running a git pull, git decided to auto pack the repository, which triggered this same error.

This is where it gets stuck:

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)

This is a Qt 4.8 C++ project on Fedora 17. I have 8GB of RAM and the partition holding the project is 33G with 27G used (88% full).

What could be causing this problem? If the machine lacks resources for running git gc, is there a way to tell git not to auto pack?


Solution

  • https://help.github.com/articles/ignoring-files

    If you skip all the generated binaries and the dlls and heavy things in the repository then it shouldn't have a problem with optimization.

    Here is how you disable it:

    https://www.kernel.org/pub/software/scm/git/docs/git-gc.html

    git config --global gc.auto 0
    

    Hope that helps.