I recently moved my programming stuff from local storage to a network storage. Since then Git doesn't work correctly anymore.
A typical scenario:
I change files. Now I want to stash the changes. I do git stash
.
Git rollbacks the changes. However the files are still marked as changed in git status
. git diff -p
shows
diff --git a/file.txt b/file.txt
old mode 100644
new mode 100755
I tried resetting the files by doing
git checkout -- file.txt
git reset --hard
but nothing works. The only way to get the working copy clean again is to chmod 644 file.txt
.
The files lie on a Synology NAS. I am mounting by cifs to my Linux machine.
I played with mount options noperm
, file_mode
, dir_mode
but can't get it to work.
I read about git config core.filemode false
but I am not sure whether this is the right thing to do here. I am afraid to damage my repository.
Does Git save permissions info in the repository/index? Can I inspect this somehow? Maybe I already did something wrong with my recents commits.