0

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

Mot
  • 28,248
  • 23
  • 84
  • 121

1 Answers1

1

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.

Community
  • 1
  • 1
Jan
  • 11,636
  • 38
  • 47