Protecting files in git repository

后端 未结 4 980
臣服心动
臣服心动 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:19

    Is there a specific reason why Git must itself be the answer to this?

    How about making the files read-only, and dictating as policy that these files shouldn't be pushed?

    Sometimes a technological solution is not the simplest way.

    If somebody does push changes to these files, these changes can always be reverted.

提交回复
热议问题