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:
- the
ls -l
command still shows the files to have 755 permissions - but the
git diff
command tells the files changed mode from 100755 to 100644
Any 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.
.git/config
file that specifiesfilemode=true
(thus overriding your global config), you can add-c core.filemode=false
to your command. However, ifgit
is being run from a script and thus affords you no control over the command-line parameters, I can't find any environment variable that can be set to accomplish the same. – Iaverne