Aubergine
Aubergine

Reputation: 6042

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

Upvotes: 3

Views: 99

Answers (1)

Aubergine
Aubergine

Reputation: 6042

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.

Upvotes: 4

Related Questions