Try setting core.fileMode
to false
as described here (docs) (git config core.fileMode false
should do the trick). This seems to make Git ignore any permission changes when hard resetting. Now, I did find that if Git couldn't read the file (e.g., I'd set the permissions to 000), a hard reset would restore the original permissions it was committed with.
Another thought, which might be of interest, would be to write a hook which would set the permissions of all files in the repo to whatever you wanted. That might also give you some assurance that you weren't accidentally leaving a new file with dangerous permissions.