I cloned a Git repository from Windows using msysgit (v1.7.7) on a network drive. Some files are marked on the repository to have mode 100755.
Using the git bash tool from Windows, the ls -l
command effectively shows the good permissions for those file.
Now when I access the repository directory from Linux, those files have 644 permissions instead of 755.
If I chmod them to 755 on the Linux side and go back to the git bash tool on Windows:
ls -l
command still shows the files to have 755 permissionsgit diff
command tells the files changed mode from 100755 to 100644Any idea how to properly handle file mode using msysgit on Windows?
I found this issue on msysgit which corresponds to my problem http://code.google.com/p/msysgit/issues/detail?id=164
I tried the proposed hint git update-index --chmod=+x
on my files but it did not change anything.
mingw doesn't support file modes as linux does. As I understand it follows windows-extension support, i.e. .exe
will have +x bits. But chmod doesn't do anything.
So, for git you should specify git config core.filemode false
to disable file mode support in mingw. And if you need to change it, you should do it under Linux.
Howerver, maybe I'm wrong, but afair cygwin does support file modes. You could try it instead of mingw.
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