How to protect “master” branch in GitHub?

喜欢而已 提交于 2019-12-01 23:23:06

Additionally it would be awsome to restrict merges to a subset of devs only.

You can restrict pushes to a branch in an Organization to specific users or teams. This will allow you to set up a team that can merge back into master.

Alternatively, for a small team, you can consider having each developer set up client-side hooks to prevent pushing to a remote master.

Lastly, if you use GitHub Enterprise that offers pre-receive hooks, you can enable one that enforces code to be merged through a PR

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!