Let me start with some context:
I had to upgrade a crucial Magento webshop to a new version. To be sure all existing code would still work after the upgrade and make
I've seen a few reports of this happening when you do "git init --bare" in a non-empty directory.
Are you by any chance working in/with a "bare"/"server" repository that isn't empty (that is, has anything else besides the .git directory in it)?
The error you're getting comes from the large files in your repository. Git is trying to put the entire contents of the file in memory, which makes it croak.
Git 1.7.6 was released last month and has this lovely bit in its release notes:
Adding a file larger than core.bigfilethreshold (defaults to 1/2 Gig) using "git add" will send the contents straight to a packfile without having to hold it and its compressed representation both at the same time in memory.
Upgrading to 1.7.6 might enable you to run git gc
and maybe even git merge
, but I can't verify because it's hard get a repository into that state (the conditions must be just right).
If upgrading Git doesn't help, you can try removing the large files from the repository using git filter-branch
. Before you do that, try backing up the large files using git cat-file -p <commit_sha1>:path/to/large/file >/path/to/backup/of/large/file
.
You'll want to do these operations on your most beefy machine (lots of memory).
If this works, try re-cloning to the other machines (or simply rsync the .git
directory).