I\'m using git
to manage files in a local directory on a Windows machine - no network is involved here, I\'m not pushing or pulling to/from another machine. My
On a similar issue I found that having a git repo in a directory below my existing git repo caused a massive slow down.
I moved the secondary git repo somewhere else and now the speed is fast!
For me, the slowness was due to having a lot of untracked files (temporary and output files from scripts.) Running git status -uno
, which excludes the untracked files, ran much faster, and meets my requirements
The issue for me was that I had a lot of different repositories cloned onto my local hard drive, the more repos you have the longer it will take to run commands like git status.
I simply deleted a lot of the repos which I no longer needed locally, and my git status went from 1minute~ to 5 seconds.
I can't see any answers similar to this here.
Have you tried repacking? git-repack.
Otherwise, try duplicating the directory, and deleting the .git folder in the duplicated directory. Then create a new git directory and see if it's still slow.
If it's still slow, then it sounds like a system or hardware issue. Git finishes status on hundreds of files for me in less than 5 seconds.
Running git fsck
has resolved this issue for me in the past.
My git status
was very slow (up to one minute), because the global .gitignore
file was located in my windows userprofile, which was stored on an inaccessible network share.
git config --global core.excludesfile
showed something like \\Nxxxx0\User\Username\Eigene Dateien\gitignore_global.txt
For some reason \\Nxxxx0
was inaccessible and my userprofile was loaded from a backup system \\Nxxxxx1
. It took some time to figure that out, because usually my userprofile is bound to a drive letter by an enterprise startup script and accessing that drive letter was working as usual.
I'm not sure why the git-config used the network share and not the drive letter (probably a younger me is to blame)
After setting git config --global core.excludesfile $HOME/Eigene\ Dateien/gitignore_global.txt
git status
was back to normal speed.