Permission of GIT files

Asked

Viewed 344 times

1

All my systems I have are giving permission problem after I give one git pull, so that for example I have a folder where my js and css files are generated mimicked. Folder Assets/min/, after I give a pull I always need to rotate chmod -R 777 assets/min so that I can change these min files, generate them again in the case, what would be the solution in this case so that I don’t need to give permission every time I make a pull?

Note: My operating system is macOS High Sierra

  • 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

  • Related: https://answall.com/questions/131475/comordisable-modo-permiss%C3%a3o-do-arquivo-no-git

1 answer

1

I had this problem a while ago. I solved it this way:

  1. 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.
  2. 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".
  3. 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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.