GitHub: Restrict Access to specific branch [duplicate]

假装没事ソ 提交于 2019-12-07 13:28:56

问题


Is there a way to restrict access to certain branches within a repository? We have production and master branches which sometimes get messed up with rogue pushes.


回答1:


Not with GitHub in the same repo.
(as opposed to local repos, which can be protected by an authorization layer like gitolite)

You could have:

  • one repo for production and master branch, with only the prod team as collaborators (if there need to be contribution by others, they can fork that repo)
  • one repo for other (more "public") branches, for the rest of the team.

Update: I still prefer having two repos, but you now (Sept. 2015) can protect a branch on GitHub.
See "How to protect “master” in github?".



来源:https://stackoverflow.com/questions/18857094/github-restrict-access-to-specific-branch

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