git是否存储文件的读取,写入和执行权限? [英] Does git store the read, write, execute permissions for files?

查看:151
本文介绍了git是否存储文件的读取,写入和执行权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在git中只读一些文件。但是我找不到任何好的文档。



git是否存储文件的读取,写入和执行权限? noreferrer> kernel.org git不会存储所有可能的文件权限。


Git是一个内容跟踪器,其中内容实际上定义为
与典型源代码树状态相关的任何内容。
基本上,这只是文件的数据和可执行属性。


所以git只存储内容在文件和执行位中。



(这可能是一个设计选择,可能并非所有文件系统都是相同的。 )

I wanted to make some files in git read only. But I couldn't find any good documentation on doing this.

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

解决方案

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是否存储文件的读取,写入和执行权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆