How to restrict access to master branch on git

后端 未结 3 1761
梦谈多话
梦谈多话 2020-11-27 12:20

I have a single repo in which I have 2 user groups:

  • Admins
  • HTML/UI Developers

I do not wish to give read/write access of my maste

3条回答
  •  温柔的废话
    2020-11-27 12:53

    In Git itself you can use the "pre-receive" hook in the server to protect for writing in a branch to some user.

    Using this hook you can apply your restriction policies for each file in the push.

    Here you can find an example.

提交回复
热议问题