We have many git repositories in bitbucket. For optimal performance I want to be sure that my repositories are being garbage collected.
How or when is git gc executed?
Hello @Sander.Hoevers ,
Garbage collection is triggered when you push commits to your repository, however it doesn't happen on every push because GC is potentially quite expensive operation, especially when the repository becomes large. Our Git configuration has some heuristics around when and what kind of GC to trigger (it has several levels of "aggressiveness").
Note that GC shouldn't really affect performance in any way because Git walks over the graph of objects that are still alive when performing modifications. It is more a matter of the repository size reported by Git to reflect actual size of alive objects.
Hope this sheds some light on how GC works. Let me know if you have any questions.
Cheers,
Daniil
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.