github设置分支push权限

1. 管理员身份登录GitHub,找到项目
2. Settings-->Branches-->Protected branches--->Choose a branch... ,选择需要保护的分支,然后点击edit按钮,
3. Branch protection for 所选的分支名 --> 勾选Restrict who can push to this branch People and teams with push access
   若不选择任何人,则任何人都没有push代码到该分支的权限。

原文地址:https://www.cnblogs.com/lvlin241/p/8872472.html