如何使Git目录或文件只读? [英] How can you make a Git directory or file read only?
本文介绍了如何使Git目录或文件只读?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将我的Photoshop文档(PSD)添加到存储库中.但是,我想成为唯一可以编辑/推送文件而其他所有人都可以读取的人.原因是开发人员知道足够的Photoshop可以使用文档来获取值(字体大小,颜色等),但是我不希望他们意外地编辑文件并提交.
I want to add my Photoshop documents (PSDs) to the repo. However, I want to be the only person who can edit/push the files and all others can read. The reason is that the developers know enough Photoshop to use the documents to get values (font size, colors, etc...) but I don't want them to accidentally edit a file and commit it.
或者也许还有另一种方式?
Or maybe there is another way all together?
推荐答案
将PSD文件放置在其他仅具有访问权限的存储库中.
Place the PSD files in a different repo where they only have pull access.
您无法使用git设置存储库中的访问权限.
You can not set access rights within the repo using git.
这篇关于如何使Git目录或文件只读?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文