I have files in my git directory that have permission 600.
When I used git-pull in my computer and git-push in another computer, the permission changes to 664.
Is there a way to preserve permissions(600) after git-pull?
Thanks
As mentioned by @Kusalananda, git normally only tracks execute permissions. In order to save more permissions information, you would need to implement a pre-commit hook that would gather up the permissions info and store it separately, and another hook to restore permissions on pull.
etckeeper is basically a collection of tools that does this for the purpose of placing your /etc directory under version control. You might want to adapt it to your purposes, or perhaps study what it does to do something similar yourself.
gitonly track execute permissions on files.git?