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 directory has maybe 100 files in it, all test files, pretty small. When I run git status
, it regularly takes 20-30 seconds to complete. Is this normal? Is there anything I can do to speed it up, or a better way to see what the state of my repository is (changed files, untracked files, etc)? Other git
commands seem to complete much faster.
The first thing to determine is if the poor behavior is due to your machine or to your specific local copy of the repo. The files in your . git folder can affect performance in various ways - settings in . git/config , presence of lfs files, commits that can be garbage collected, etc.
Git slowness is generally from large binary files. This isn't because they're binary, just because binary files tend to be large and more complex to compress & diff. Based on your edit indicating the file sizes, I suspect this is your problem.
If you are using Windows, check to see if some Windows process has some file or files in that repository locked. If so, your git command will wait for that other process to release the lock, before proceeding. If that other process never lets go, Git never proceeds.
Have you tried git gc? This cleans cruft out of the git repo.
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