Protecting files in git repository

后端 未结 4 981
臣服心动
臣服心动 2021-01-02 05:51

I have a central repository with a subset of files that I want to protect from being changed (by pushing) from other users. If I add these files to .gitignore,

4条回答
  •  佛祖请我去吃肉
    2021-01-02 06:07

    It sounds to me like the problem lies elsewhere if you need this level of access restriction.

    Nonetheless, if you indeed do want to implement this, consider Gitolite. It allows you to define rather detailed access rules and should probably suffice for your needs.

    Gitolite documentation: http://gitolite.com/gitolite/master-toc.html

    You can define 'virtual refs' to control access on file level. More on that: http://gitolite.com/gitolite/vref.html

提交回复
热议问题