I work mostly on Linux, but I also have a Windows VM, mostly to run unit tests on Windows.
In Linux I have a Git repository, which is accessible from the Windows VM using a VirtualBox Shared Folder. I don't use Git on Windows, except for our build system, which records the current Git hash to include it in the executable (running git describe --always --dirty
).
Now, every time I use Git on either Linux or Windows and then again on the other system, it takes a while. For example:
Linux$ git status
Linux$ git status # fast (<1s)
Windows$ git status # takes a few dozen seconds
Windows$ git status # fast (<1s)
Linux$ git status # takes a few seconds
Linux$ git status # fast (<1s)
Is there anything I can do to prevent this from happening? I'd be fine turning off Git features on Windows, as it only needs to get a hash. However I can't change how this hash is obtained, as this is deep in the build system. I also do not want to have separate repositories on Linux and Windows and commit/push from one another, as this would result in an ever bigger overhead.
Linux git version: 2.11.0.
Windows git version: 2.14.1.windows.1.
git status
would be immediate as it only needs to go to a local disk. Sharing a single repo via shared / network storage is not really the intended use case for git. – Breastsummer