We have a remote git repo and some time we create directories with permission 777 but when others pull from the remote repo and checkout, directory permission isn’t 777. How can I preserve directory permission in git?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
gitdoes not track permissions on files (only a single flag for executable/not executable), and does not track directories at all. If you really need to propagate permissions, you can add a short script to your repository that will set appropriate permissions, or researchgitadd-on tools that essentially do this for you by capturing file metadata and re-implementing it on the remote end.