3

I am working on a system where I have a very small disk quota (5GB). I have a few large datasets, versioned with git and my disk quota was beginning to run out. My data was ~2GB and my .git directory was around 2GB also, so I tried a repack with

git repack -a -d --depth=250 --window=250

But I ran out of quota during the repack

 $ git repack -a -d --depth=250 --window=250
 Counting objects: 5168, done.
 Delta compression using up to 48 threads.
 Compressing objects: 100% (3840/3840), done.
 fatal: fsync error on '.git/objects/pack/tmp_pack_W36UC8': Disk quota exceeded

Now my quota is full and there's not much I can do.

I notice that there are some large .git/objects/pack/tmp_pack_* files clocking in just over 1GB, is it safe to delete these until I can get my quota increased?

bountiful
  • 814
  • 1
  • 8
  • 22

1 Answers1

0

Can you delete your working tree, repack, prune all you can with gc, etc., then checkout again?

Gary Fixler
  • 5,632
  • 2
  • 23
  • 39
  • What if repack still runs out of space even after deleting the working tree? – bountiful Mar 08 '14 at 23:42
  • There will always be a limit, and if you just don't have the disk space, you're out of luck. Some thoughts: 1) can you use a USB/thumb drive to help out? 2) do you have enough RAM to create a RAM disk on which to work? (I have industry friends with dozens of GBs of RAM) 3) you can try the `--aggressive` flag to gc, which trades more time for less space 4) make sure you're pruning and garbage collecting everything you possibly can, i.e. tweak the lower limits on git's retention policies to delete junk from right now backwards, instead of say, a month ago backwards. – Gary Fixler Mar 09 '14 at 16:21