I had this problem a while ago. I solved it this way:
- Open your local repository folder with Finder. Click the folder and press I. This should open the folder information. If a padlock appears in the window, click and enter your Mac password to give write permissions.
- At the end of this window, look for "Sharing & Permissions". There is a table of permissions and users. On your user, where it indicates "(Me)", select "Read and Write".
- Click on the configuration icon (gear) and select "Apply to Enclosed items".
This will put write and read permissions for all folders, subfolders and files on your user to the folder of your local repository. If you have difficulties, use that print as a reference.
If by chance you share this folder with someone on the network, it is a little more boring to solve. Then you can try to add the following in your .gitconfig
:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sharedRepository = group
Has a more detailed blog about here.
You can change the umask ... Follow URL on http://www.itnerante.com.br/group/colunadoboechat/forum/topics/alterando-permiss-es-padr-no-linux-com-umask
– Diego
Related: https://answall.com/questions/131475/comordisable-modo-permiss%C3%a3o-do-arquivo-no-git
– Wallace Maxters