I have a project in which I have to change the mode of files with chmod
to 777 while developing, but which should not change in the main repo.
Git pick
You can configure it globally:
git config --global core.filemode false
If the above doesn't work for you, the reason might be your local configuration overrides the global configuration.
Remove your local configuration to make the global configuration take effect:
git config --unset core.filemode
Alternatively, you could change your local configuration to the right value:
git config core.filemode false