简体   繁体   中英

Garbage collect useful on central Git repository

We use a central Git repository. Would it be useful to regularly run "git gc" on the server?

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. How often should you run it? It depends .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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