How to use git to commit read-only file?

Solution 1:

Git does not store file permissions except for the executable bit. I presume Git will simply use your current umask to set the access rights on any operations. And there's not much point in version controlling something you can't edit...

It looks like the core.fileMode configuration option controls this behaviour.