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?

有帮助吗?

解决方案

git does 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 research git add-on tools that essentially do this for you by capturing file metadata and re-implementing it on the remote end.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top