Robert Pawlak
Robert Pawlak

Reputation: 529

How to work with git repo between linux and windows

I have virtual box with installed arch linux. Host system is windows 10. I have mounted disc via virtual-box quest utills. From VM level I clone repository inside shared windows/linux space. Clone is done with success. But creating some files in working directory provide some errors: (gcc repository)

error: unable to unlink old 'fixincludes/tests/base/ctype.h': Interrupted system call
error: unable to create file gcc/ada/libgnat/a-chacon.ads: File exists

error: unable to unlink old 'fixincludes/tests/base/sundev/vuid_event.h': Text file busy

In both git client (host and virtual) i have set longpaths to true.

If any information is needed, please ask.

Upvotes: 1

Views: 4917

Answers (1)

bk2204
bk2204

Reputation: 76449

It isn't generally a good idea to work on the same non-bare repository (that is, using the same directory) between two different systems using a shared drive. Remote file systems, even systems like you're using with Virtualbox, don't tend to provide the richness of locking and functionality that Git wants to use, and this is especially true when you're sharing between Windows and Linux.

It's better to use a separate clone on Windows and Linux and use a shared bare repository that you can push and pull from on demand (and not at the same time). This will prevent the mandatory locking that Windows programs do on many files from interfering with your Linux checkout, which is part of what looks like is occurring here.

Upvotes: 6

Related Questions