1

I would to change gc.auto parameter to something "much larger than 6700" as recommended here so git gc --auto does not run every time I do a pull (which it is doing now for some reason) how do I do this? I have checked the config file and do not see this parameter should I add it? I have run git gc --aggressive twice and git gc --auto is still running on every pull.

performance-mean

Community
  • 1
  • 1
Alex Borsody
  • 1,678
  • 8
  • 39
  • 72

3 Answers3

1

Use the git config command:

git config --global gc.auto 13400

That will double the parameter size for all your repos. As a note setting it to 0 disables it.

Ilion
  • 6,537
  • 2
  • 23
  • 46
0

Probably the easiest thing to do is to add it from the command line in the repository that requires adjustment:

git config --local gc.auto <value>

where <value> is the number that you want.

John Szakmeister
  • 41,719
  • 9
  • 84
  • 75
0

Yes you need to add a new config option.

  • If you want the config to be local to your repo, run this:

    git config --local gc.auto <NEW_VALUE>
    
  • If you want it to be global, use this:

    git config --global gc.auto <NEW_VALUE>
    
  • You could also add the following lines manually to your ~/.gitconfig or your repo's .git/config:

    [gc]
        auto = NEW_VALUE
    
Tuxdude
  • 44,385
  • 13
  • 103
  • 107