Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git is slow on startup

Tags:

git

I have a small problem with git in my pc, I create a new folder and i start Git Bash, but it takes so long for it load git, as in it will show the command prompt but it need a while for the git line to show up.

Any clue on this?

Thanks

like image 297
Daniel Mahadi Avatar asked Jan 05 '10 05:01

Daniel Mahadi


4 Answers

I had a similar problem. Turned out that the home directory was on a network drive and this caused alot of slowdown.

You can check your home directory by typing echo $HOME in Git bash. If it points to a network drive you can change it to a local path (for example C:\documents and settings\<login> on XP) by setting the HOME environment variable in Windows.

If start-up is still slow, see if the starting directory for the Git Bash shortcut is %HOMEDRIVE%%HOMEPATH%. If so, try changing it to %HOME%.

like image 105
Risingson Avatar answered Nov 04 '22 11:11

Risingson


You may not be aware that you don't actually need to use the "Git Bash" shell. If you add the directory containing git.exe to your PATH environment variable, then you can simply run git commands from the regular Windows command prompt.

like image 40
Greg Hewgill Avatar answered Nov 04 '22 13:11

Greg Hewgill


Upgrading to the latest version (1.7.3.1) seems to have resolved this problem for me, on XP.

like image 1
Benjol Avatar answered Nov 04 '22 13:11

Benjol


Could you check your .bashrc?

Sometime, a prompt a little too much sophisticated can render the shell slow to respond.
See this blog entry as an illustration.

like image 1
VonC Avatar answered Nov 04 '22 11:11

VonC