Git Bash is extremely slow on Windows 7 x64
You can significantly speed up Git on Windows by running three commands to set some config options:
git config --global core.preloadindex truegit config --global core.fscache truegit 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/
My Windows home directory is on the network, and I suspected that Git Bash commands were looking there first. Sure enough, when I looked at $PATH
, it listed /h/bin
first, where /h
is a share on a Windows file server, even though /h/bin
doesn't exist.
I edited /etc/profile
and commented out the export command that puts it first in $PATH
:
#export PATH="$HOME/bin:$PATH"
This made my commands run much faster, probably because Git Bash is no longer looking across the network for the executables. My /etc/profile
was c:\Program Files (x86)\Git\etc\profile
.