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

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

问题描述

我想让 git 中的一些文件只读.但是我找不到关于这样做的任何好的文档.

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

git 是否存储文件的读、写、执行权限?

推荐答案

根据 内核.org git 不会存储文件的所有可能权限.

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

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

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.

所以 git 只存储文件中的内容和执行位.

(这可能是一种设计选择.可能部分是因为并非所有文件系统都相同.)

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

这篇关于git 是否存储文件的读、写、执行权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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