I work on a lot of small projects on daily basis and need to switch often.
I know this is an old question, but you could also try this:
$ git config --global core.preloadindex true $ git config --global core.fscache true $ git config --global gc.auto 256
Secondly, here is a post that explains that
git gc --aggressive may not be a great idea.