why my file permission being changed after pull from git repository

余生颓废 提交于 2019-11-28 10:33:58
VonC

As described in "Git set create mode to 100664 when pushing new folder/files to shared repo":

git doesn't store file permissions at the level you want. Having 644 or 664 files depends purely on umask."

(022 in your case, as commented by Jan Hudec

Git only stores two permissions (755=rwxr.xr.x, 644=rw.r..r..).

git simply doesn't track permissions.
In fact, it refuses to. Turns out there are enough mutually-exclusive definitions of how to do it right, all of which can be whipped up with simple scripting, that the simple scripting is the right way to implement it.
Plus, those rules are best left per-repo, because there's repo purpose and host OS to consider.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!