简体   繁体   English

垃圾收集对中央Git存储库有用

[英]Garbage collect useful on central Git repository

We use a central Git repository. 我们使用中央Git存储库。 Would it be useful to regularly run "git gc" on the server? 在服务器上定期运行“ git gc”是否有用?

According to the man page : 根据手册页

Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance. 鼓励用户在每个存储库中定期运行此任务,以保持良好的磁盘空间利用率和良好的运行性能。

If you care about disk usage, sure it would be useful. 如果您关心磁盘使用情况,请确保它会很有用。 If you've got efficiency in mind, benchmark it. 如果您考虑效率,请对其进行基准测试。 git gc shouldn't cause any harm, especially in a central repository whose contents are rarely (or rather never) deleted after being written. git gc不会造成任何损害,尤其是在中央存储库中,其内容在写入后很少(或永远不会)删除。 How often should you run it? 您应该多久运行一次? It depends . 这要看情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM