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.

Can anyone provide a hint?

OS ver: 10.9.5

  • jenkins is slow resopnding to main page request
  • Phpstorm superslow - 282.8% CPU usage
  • Git for development and live websites
  • SourceTree very slow with many repositories
  • How to use git metadata strategies compared to ClearCase ones?
  • Git's performance with Big Commits vs. tiny commits
  • Why is GitHub so much faster than a self hosted repository?
  • Efficiency of branching in shaders
  • 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"
    

    Credits to:

    “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.

    Git Baby is a git and github fan, let's start git clone.