我用hg-fast-export将一个旧的Mercurial仓库导出到git,它是115 MB。当我运行hg-fast-export as described here时,得到的git仓库是663 M。知道为什么吗?
bvjveswy1#
答案是git gc --aggressive,我实际上是从一篇文章中得到的,Linus Torvalds说这是一个坏主意,但他的命令不起作用,而这条命令起作用了。https://web.archive.org/web/20071231101230/https://metalinguist.wordpress.com/2007/12/06/the-woes-of-git-gc-aggressive-and-how-git-deltas-work/我还必须更改打包的内存使用参数,如下所述:Is there a way to limit the amount of memory that "git gc" uses?
git gc --aggressive
1条答案
按热度按时间bvjveswy1#
答案是
git gc --aggressive
,我实际上是从一篇文章中得到的,Linus Torvalds说这是一个坏主意,但他的命令不起作用,而这条命令起作用了。https://web.archive.org/web/20071231101230/https://metalinguist.wordpress.com/2007/12/06/the-woes-of-git-gc-aggressive-and-how-git-deltas-work/
我还必须更改打包的内存使用参数,如下所述:
Is there a way to limit the amount of memory that "git gc" uses?