Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经用svn2git导入了一个 SVN Repo。现在我选择了如何重新打包/垃圾收集 repo 以减小大小,但我不想牺牲以后 git 操作的性能。我怎么做?
该工具的主页建议:
git repack -a -d -f
或者我应该使用一个非常长的深度和窗口:
git repack -a -d -f --depth=250 --window=250
后期 git 操作的性能是否会受到这些gc决定的影响?
有关这些参数的影响的解释,请参阅此详细实验。
现在的默认值git gc --aggressive 是50 和 250,因此您可以运行git gc --aggressive并依赖它具有适当的默认值。
git gc --aggressive