We are in position where we have absolutely no idea how to solve. The problem is that we have a 2.56 GiB repo-size. The main problem is the git-server's RAM usage when cloning the repository: the server will pack the repo and after a while, the connection is dropped (or something else happens that prevents cloning!). Other services on the server (another git-repo and a jenkins) are going to swap and aren't useable anymore.
Here are some informations about our repo:
- git count-objects -vH says {1}
- one framework in the app have (alone!) ~350 MB
- another framework have ~ 150 MB
- there are some more frameworks but with less size
- one *.pack with a size of 2.75 GB
The big frameworks are updated 2-3 times. So we think (we aren't really git gurus :)) the history contains older versions of the great frameworks.
We have take a look at git repack and at git filter-branch. But booth, when we understand it correctly, dosn't save our problem.
We can't remove one of our big framework because we need it to develop. When we removed it from history we can't checkout to an older version anymore.
We have tried to move the big frameworks into seperate git repos. But that dosn't solve the problem because our history are big forthermore.
So how can we solve our problem without loosing things from history?!
{1}
count: 829
size: 4.82 MiB
in-pack: 23365
packs: 2
size-pack: 2.56 GiB
prune-packable: 13
garbage: 1
size-garbage: 6.00 KiB
***Edit***
Here is my output when I say:
git clone https://git.repo.url.git
remote: Counting objects: 23942, done.
remote: warning: suboptimal pack - out of memory
remote: fatal: Out of memory, malloc failed
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
When I make a git init
and set the config like this (because of this commend):
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
packedGitLimit = 128m
packedGitWindowSize = 128m
[pack]
deltaCacheSize = 128m
packSizeLimit = 128m
windowMemory = 128m
my output is this:
remote: Counting objects: 23942, done.
remote: warning: suboptimal pack - out of memory