tags:

views:

280

answers:

6

Hi,

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

+2  A: 

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.

Greg Hewgill
Will it be faster though?
jpartogi
@jpartogi - A little (subjective feeling; cannot verify now) - but you'll lose all the "sparks and stars" (colors in shell and the like). The advantage (or disadvantage) is that you're using cmd instead of bash.
ldigas
A: 

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.

VonC
@Vonc: I cannot find such file. Where is it usually reside?
Daniel Mahadi
@Daniel: On windows, in your user home directory (`c:\Users\login` for Vista and Seven, `C:\Document And Settings\login` for Xp)
VonC
@Vonc: I think i dont have that kind of setting. I cant find the file under c:\users\<username>\
Daniel Mahadi
@Daniel: and in `C:\cywgin\<username>`?
VonC
@Daniel: are you using MSysGit? MSysGit creates all its dotfiles as hidden files. If you want to be able to see `.bashrc` in the explorer, you have to modify your vew settings to also show hidden files. Or, you could just blindly type `%UserProfile%\.bashrc` into the open dialog of your favorite text editor. It'll be there.
Jörg W Mittag
@Jorg: Yes, i am using MSysGit, the file is not there
Daniel Mahadi
What's weird is that if I close the bash window and reopen one, it's very fast. It's on the first try that it's slow.
Benjol
A: 

Hmm, sounds like I'm having the exact same problem. The startup lag (30s+) wouldn't be so much of a pain, but the prompt is taking a long time to come back from almost any other call, too (3-4s for just pressing enter).

I cleared out my .bash_history and .bashrc (I had a single alias set up before, ls='ls --color'), and it seems to have gotten a little better, but it's still unfortunately painful. Uninstall/reinstall didn't help either.

I'm using Git-1.6.5.1-preview20091022 on windows XP, 2 gig of ram etc - but I doubt it's the computer. Additionally, on my ubuntu partition git runs fine.

My partition is a little full (93%), but defragging and clearing out old movies hasn't helped, even when followed by the uninstall/reinstall mentioned above. :-/

Arandia
Having the same problem here. Seems to be more noticable since I upgraded from git ~1.6.4
Chris
A: 

Hi, Guys.

I decided to use Powershell with Git. It works great and fast. you can even wire other git UI, like QGIt (I found it richer then the Git Gui and Gitk).

Daniel Mahadi
A: 

Any users having slowness problems in Windows 7 may like to check out this related question which explains that it is because of UAC. The solution is to Run as Administrator.

Unfortunately this doesn't resolve the symptoms described in the question (just slow at startup) on my XP machine.

Benjol
Note: if this resolves your problem, please don't mark it as the answer, at least not without changing the question title to include the fact that it is on Windows7 and not just at startup!
Benjol
It doesn't. I have UAC turned off. Somehow it just got fast some time ago, but thanks for your time.
n2liquid
what? I thought I had asked this question. Just seen now it wasn't me. Sorry :p
n2liquid
A: 

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

Risingson