I love git and use it on OS X pretty much constantly at home. At work, we use svn on Windows, but want to migrate to git as soon as the tools have fully matured (not just TortoiseGit, but also something akin the really nice Visual Studio integration provided by VisualSVN). But I digress...
I recently installed msysgit on my Windows 7 machine, and when using the included version of bash, it is horrendously slow. And not just the git operations; clear
takes about five seconds. AAAAH!
Has anyone experienced a similar issue?
Edit: It appears that msysgit is not playing nicely with UAC and might just be a tiny design oversight resulting from developing on XP or running Vista or 7 with UAC disabled; starting Git Bash using Run as administrator
results in the lightning speed I see with OS X (or on 7 after starting Git Bash w/o a network connection - see @Gauthier answer).
Edit 2: AH HA! See my answer.
You can significantly speed up Git on Windows by running three commands to set some config options:
git config --global core.preloadindex true git config --global core.fscache true git config --global gc.auto 256
Notes:
core.preloadindex
does filesystem operations in parallel to hide latency (update: enabled by default in git 2.1)
core.fscache
fixes UAC issues so you don't need to run Git as administrator (update: enabled by default in Git for Windows 2.8)
gc.auto
minimizes the number of files in .git/
The solution for slowness on Vista or 7 appears to be running Git Bash using Run as administrator
(or disabling UAC for the Git Bash shortcut...or disabling UAC entirely). The difference is night and day and using git on 7 is awesome again.
This appears to be related to a known issue and, as I speculated, XP as a development environment for msysgit is partially responsible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With