Topic: Is there a way to run "git gc" on the server?

Hi! When initializing the git repository for our project "hatari", I apparently pushed accidentally  a local copy that contained a lot of unnecessary objects, so the current repository is quite big (> 100 MiB). After checking it out, it is possible to get rid of the unnecessary objects by running the git garbage collection in the local checkout:

git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 \
     -c gc.rerereunresolved=0 -c  gc.pruneExpire=now gc --aggressive

After that, the size goes down to less than 30 MiB, which sounds much saner.
Since there is a quota for the server repository on tuxfamily, and since we'd like to avoid that everybody has to download all the unnecessary objects from the server first, I'd like to ask whether you could run this garbage collection also in the server repository for us? (so far, I did not spot a possibility to trigger it from my side on the server)


Re: Is there a way to run "git gc" on the server?

Hi thomas,

Done !

By the way, I really wanted to see your lecture at FOSDEM, but unfortunately I failed to reach the room in time, I'm waiting for the video to be available ;-)


Re: Is there a way to run "git gc" on the server?

Great, thank you very much!

Maybe that's also something to consider for you to run from a cron-job regularly for all git repositories on ... you likely could save quite some disk space and network bandwidth this way.

With regards to the video from my presentation at the FOSDEM, I'm not sure whether it will be available at all finally... there were apparently some problems with the recording on Saturday morning, so it might be lost ...