GIT: How to protect the branch from being removed by other developers?

后端 未结 5 1941
情歌与酒
情歌与酒 2021-02-19 20:29

After the first release of our product, we will be switching to a different branches for the main development and feature development. Is there a way to create a branch in such

5条回答
  •  逝去的感伤
    2021-02-19 21:08

    You can use branch permissions on the server by adding a pre-receive hook that protects your repository and add something like this to your config file in your bare repository:

    [hooks]
            allowedtomerge = user1,user2,user3
            protectedbranches = master
    

提交回复
热议问题