Answer the question
In order to leave comments, you need to log in
How can you keep the repository on a virtual machine, and edit the files on Windows so that the file permissions do not change?
My OS is Windows 7, and for development I use a Virtualbox virtual machine with Ubuntu 12.04. There is a Git repository on the virtual HDD, the files in which I would like to edit from Windows.
I set up a shared folder from the Virtualbox interface, but only the folder on the host is rummaged with this method, and NTFS does not support UNIX permissions. I copied the repository to the shared folder, and now `git status` on Ubuntu shows a lot of changed files (only the permissions have changed). I can set the git `git config core.fileMode false` setting, but that's not exactly what I need.
Question for the audience: how can you keep the repository on a virtual machine, and edit files on Windows so that the file permissions do not change?
Answer the question
In order to leave comments, you need to log in
Samba will solve your problem. I use this method myself. Through the network folder, the rights do not change.
Vstav'te i host i guest v odnom LAN - Host-only adapter. After - samba or nfs.
I doubt it's possible. It seems to me that it would be easier and more correct to write a small script (shell or means of the language / framework / etc.) that sets the rights "as it should" and put it in the repository.
Git is a distributed version control system, you don't need to use it like SVN. Clone repositories as needed, it's easy and can be done locally.
Create a Git repository in the bare shared folder:
mkdir repo
cd repo
git init --bare
git remote add origin [путь к папке разделяемого репозитория]
git push origin master #отправляем ветку master в удаленный репозиторий по ссылке origin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question