git branch switch takes half a minute?
Got an more powerful and fresh machine from work, starting installing dev tools and this is simply nightmare, I’ve never ever had performance issues with git on the old machine. Here it is beyond reason:
ons-mbp:spec ALE$ time git checkout fsfs Switched to branch 'fsfs' real 0m30.080s user 0m0.007s sys 0m0.006s ons-mbp:spec ALE$ time git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. real 0m30.083s user 0m0.007s sys 0m0.007s
Tried reinstalling different git version, tried via homebrew and manually – zero effect.
- Git notes perfomance and alternatives
- Why git log --cherry-pick is so slow?
- how to suggest gcc compiler more probable branch
- SourceTree very slow with many repositories
- git - only fetch the files, not the history
- Is branch divergence really so bad?
Can anyone provide a hint?
OS ver: 10.9.5
One Solution collect form web for “git branch switch takes half a minute?”
When doing fresh install completely forgot about setting global user details.
git config --global user.name "Test Test" git config --global user.email "testgmail.com"
“I normally do this right away when setting up my account on a new machine. The fresh install didn’t trigger that reflex. I’m surprised that this is needed to keep git from preforming silly DNS lookups but no big deal.”
ons-mbp:spec ALE$ time git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. real 0m0.012s user 0m0.006s sys 0m0.005s ons-mbp:spec ALE$ time git checkout fsfs Switched to branch 'fsfs' real 0m0.012s user 0m0.006s sys 0m0.005s
Saved from heart attack.