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

后端 未结 5 1946
情歌与酒
情歌与酒 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:33

    Since the OP shershams mentioned in the comments

    we're planning to switch to github and I was wondering if they have something implemented there for this purpose

    It turns out there is something implemented (and available soon) in GitHub:

    Protected branches and required status checks (September 3, 2015) will allow you to protect a branch:

    • against forced pushed
    • against deletion
    • against merged changes until required status checks pass

    Note that, since Dec. 4th 2019, you can grant all users with push access the ability to delete a protected branch by enabling Allow deletions.

提交回复
热议问题