I've been having a problem where all files that I don't want to be tracked by git keep changing permission from 644 to 444 whenever I do git pull (I'm currently using CentOS 7). I'm using git-lfs with the .gitattributes contains:
[!.]* filter=lfs diff=lfs merge=lfs -text lockable
I've also set the following in the .git/config
[core]
filemode = false
autocrlf = true
I've been using git-lfs to tracked all type of files that being pushed to the remote server but there are files that I wished stayed and can be edited locally. Its a hassle to change the permission everytime I am pulling the changes from remote.