[pytest-dev] moving to git / issues?
Florian Schulze
florian.schulze at gmx.net
Thu Jun 25 11:13:42 CEST 2015
On 25 Jun 2015, at 10:53, Floris Bruynooghe wrote:
> On 24 June 2015 at 09:01, Florian Bruhin <me at the-compiler.org> wrote:
>> * Florian Bruhin <me at the-compiler.org> [2015-06-23 15:05:51 +0200]:
>>> After doing a git gc --aggressive the repo shrinks from 55 MB to
>>> 9.2 MB for me.
>>>
>>> So for future migrations it might make sense to do that in the
>>> converted git repo before pushing.
>>>
>>> I contacted GitHub support to ask if they can do that on the repo.
>>
>> They now did run it, and the download is around 5.7 MB now :)
>
> Nice! Thanks for looking into this.
I did some experiments on some of my repositories. I had a 800MB
repository that shrank to 220MB. You have to be careful though. By
default the repacking has no memory limit and uses as many threads as
you have cpu cores. My poor server with 16GB Ram and 8 cores used 20GB
Swap extensively :) On my laptop the process died at first. You can set
"git config pack.threads 1" and "git config pack.windowMemory 1g" in
your repository before you run git gc to avoid that issue. The whole
process can take a pretty long time depending on your repository.
In general it seems like this is only needed as a final step after a
migration from another version control system or if you have a lot of
constant changes in the same files in each commit (I backup database
dumps with git to keep some history).
Regards,
Florian Schulze
More information about the pytest-dev
mailing list