I have a shared folder from my host machine -> guest machine on my virtualbox (Mac OS X host, RedHat guest). The shared folder was created on the host and I did things like git checkout etc. on the guest. The problem is that it takes too long to run commands like git status and others on the guest. Is it a known problem or is there a workaround to solve this?
(git status works fine on a non-shared folder on both host or guest).
Try entering git prune && git gc
to perform a cleanup of unreachable objects and a garbage collect. You can also do git repack -Adf
to try repacking everything and see if that makes any change. git status
is speed limited by walking the working tree and calling stat() on everything. If that call is slow (network drive or something about the virtualization) then the status command will perform poorly.
git fsck
and git count-objects
are a couple more commands to use. If there a lots (>200) of objects things can start to be slower.
Then clone from that repo to a better filesystem, work there, push your changes back.
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