1
我有一个旧的mercurial存储库,我正在使用hg-fast-export导出到git。它是115MB。当我运行hg-fast-export as described here时,生成的git存储库为663M。任何想法为什么会这样?当我将mercurial导出到git时,为什么结果如此之大?
我有一个旧的mercurial存储库,我正在使用hg-fast-export导出到git。它是115MB。当我运行hg-fast-export as described here时,生成的git存储库为663M。任何想法为什么会这样?当我将mercurial导出到git时,为什么结果如此之大?
答案是 git gc --agressive
我从Linus Torvalds说这是一个坏主意,但他的命令没有起作用,并且这样做了一篇文章。
http://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?
我不知道善变的导入脚本做什么,但尝试运行'混帐gc'或'git repack'(你可能需要尝试各种各样的选项)以查看是否缩小了事物。 – 2014-12-04 16:42:43
git repack表示没有什么可以打包的。 git gc使它更大100MB ... – 2014-12-04 16:51:22
'git repack -a -d --depth = 250 --window = 250'是我正常的回购缩减命令。根据导入脚本的作用,您可能需要首先清理额外的refs和/或reflog。但是你可以先尝试'重新包装'。 – 2014-12-04 16:54:40