I read this solution How do I make Git ignore file mode (chmod) changes? and tried a number of other things but the following keeps happening:
When I do
git status -v
It shows
diff --git a/video.html b/video.html
old mode 100644
new mode 100755
So it's picking up changes in file permissions, but when I run the following command to make it ignore file changes
git config core.filemode false
It still sees the changes. Am I doing something wrong or misunderstanding how filemode works?
I also tried changing global git settings, modifying the .git/config file etc to set filemode to false but nothing works, it still sees the changes.
Manual permission change via git update-index
The only workaround I found for now is by going to repo folder and doing something like git update-index --chmod=-x FILENAME
with a recursive approach
git ls-files --stage | grep 100755 | cut -f2 | xargs git update-index --chmod=-x
But this does not cover all of the files unfortunately
"Solution"
In the end had to do a hard reset from master to fix the issue. Think the problem was that I committed that files with changed permissions BEFORE doing the git config core.filemode false
and once committed I'm assuming it was somewhere in git cache and there was no way to ignore the permissions with any sort of filemode change.