Git push "error: index-pack died of signal 9"

If you're using the Dreamhost server to keep bare repositories you can add and commit locally and then rsync your .git directory up to DH. After it finishes go into the server's [repository name].git/config and change core.bare from false to true.

Not sure exactly what you'd do if you want work trees on the server, it hasn't come up for me.


Mac Users

In my case I had used brew install git which messed up the git from xcode

Running brew uninstall git fixed the issue


Sometimes this happens with an enterprise github as well due to load issues. I found a good way is to split the clone into two operations, which makes for lighter load on the server.

First, do a shallow clone: git clone --depth 1 myRepo.git

Next, enter the clone, and get all the rest of the history to make a full clone: cd myRepo && git fetch --unshallow

If you have an old version of git which does not support the --unshallow flag, then you can instead do something like git fetch --depth=1000000 or some other suitably large number.

Some more alternatives are discussed in this blog post: https://blogs.atlassian.com/2014/05/handle-big-repositories-git/


Git is somewhat memory intensive for certain operations, trading memory usage to get improved disk or network performance. (See for example some discussion on this other SO question.)

In this case, I think you and your colleagues are effectively doing a different cost trade-off: you are trading off using a professionally managed Git hosting service (such as GitHub or BitBucket) for either perceived financial savings or some other convenience (perhaps deployment?).

My recommendation, if you are not comfortable following the kinds of recommendations on the wiki/blog-post that you've cited, is to move to GitHub or Bitbucket. (I think those posts offer technically accurate solutions, FWIW.) Bitbucket offers free unlimited private repositories so there's no real cost reason to use Dreamhost for your Git hosting.

If you need some sort of deployment solution to go along with the hosting, you can engineer something that takes pushes and automatically updates just the working directory to Dreamhost for hosting, without incurring the full cost of hosting a Git repository (and all of your history) on Dreamhost.

Tags:

Git

Git Push