简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM