How to protect “master” in github?

前端 未结 4 1456
终归单人心
终归单人心 2020-11-30 03:06

I have a few contributors in my github project. I want to allow only one of them to \"push\" to master. And this guy is not me (the owner of the repository). Is it possible

4条回答
  •  無奈伤痛
    2020-11-30 03:42

    Note: 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


    Since March 2016, as commented by Sander below, you have User and team restrictions

    Sometimes merges to a protected branch are best left to a release manager or a team of people responsible for the stability of that particular branch. Organizations can now specify which members and teams are able to push to a protected branch.

提交回复
热议问题