I wanted to make some files in git read-only. But I could not find good documentation about this.
Does git support read, write, execute permissions for files?
According to kernel.org, git does not save all permissions available to files.
Git is a content tracker where the content is de facto defined as "everything that relates to the state of a typical source tree." In principle, this is only file data and the attribute "executable".
So git only stores the contents in the file and the execution bit.
(Perhaps this is a design choice. This is probably partly due to the fact that not all file systems are the same.)
git update-index --chmod = + x foo.sh