In the past, one had to invoke git gc from time to time. I've read now, that latest Git versions should perform the cleanup automatically. Is this correct?
Git: automatic clean-up?
3.8k views Asked by Mot At
2
There are 2 answers
0
On
You can setup a cron task as explained here: http://minhajuddin.com/2011/12/09/gc-your-git-repositories-automatically-with-a-cron-task
As the git help gc says: users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.
Some git commands may automatically run git gc. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do:
git config --global gc.auto 0
Also, you can configure prune behaviour:
git config gc.pruneexpire "30 days"
To an extent...
From the documentation at http://www.kernel.org/pub/software/scm/git/docs/git-gc.html
Pertaining to git gc --auto....
So it depends on the commands you are running.