Does git store the read, write, execute permissions for files?

心已入冬 提交于 2019-11-29 05:53:17

According to kernel.org git does not store all the permissions possible for files.

Git is a content tracker, where content is de facto defined as "whatever is relevant to the state of a typical sourcecode tree". Basically, this is just files' data and "executable" attribute.

So git stores only the content in the file and the execute bit.

(This is probably a design choice. Probably driven partly by the fact that not all file systems are the same.)

git update-index --chmod=+x foo.sh

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