1

Every time i do a "git checkout ", it takes at least 90 secs to switch to a branch. It used to take less than a second. I see the message "Checking out submodules" and it takes a while to get out of that. How do I fix this please ? Any help appreciated.

Tried re-installing git. But no change.

phd
  • 82,685
  • 13
  • 120
  • 165
SilentGeek
  • 11
  • 1
  • 1
    Show us your repositories. Without them there is too little information to help. Perhaps one or few of the submodules slowing down the process. Try to experiment with `git checkout --no-recurse-submodules`. Try to checkout in your submodules manually to see which one is the culprit. – phd Sep 10 '19 at 18:28
  • 2
    Please visit these links: https://stackoverflow.com/questions/26957237/how-to-make-git-clone-faster-with-multiple-threads https://stackoverflow.com/questions/48823520/git-checkout-to-a-branch-takes-long-time – Azdy Sep 10 '19 at 18:35
  • @phd how do i see the submodules that are slowing down the process ? – SilentGeek Sep 16 '19 at 14:27
  • I said "manually". Also `git submodule foreach` prints "Entering ". – phd Sep 16 '19 at 15:43

1 Answers1

0

First, check if the latest version of Git is faster (as in git 2.23). I mentioned here for instance progress on that front.

Then, as a workaround, check if git checkout --no-recurse-submodules is quicker

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250