'When I export mercurial to git, why is the result so large?

I have an old mercurial repository that I am exporting to git using hg-fast-export. It is 115MB. When I run hg-fast-export as described here, the resulting git repository is 663M. Any idea why that would be?



Solution 1:[1]

The answer was git gc --agressive which I actually got from an article where Linus Torvalds said it was a bad idea but his command didn't work and this one did.

https://web.archive.org/web/20071231101230/https://metalinguist.wordpress.com/2007/12/06/the-woes-of-git-gc-aggressive-and-how-git-deltas-work/

I also had to change the memory usage parameters for packing, as described here:

Is there a way to limit the amount of memory that "git gc" uses?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Charles Moss