GitHub:限制访问特定分支 [英] GitHub: Restrict Access to specific branch
本文介绍了GitHub:限制访问特定分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法可以限制对存储库中某些分支的访问?我们有生产分支和主分支,有时会被无赖推送弄得一团糟.
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.
推荐答案
不适用于同一回购协议中的GitHub .
(与本地存储库相反,本地存储库可以受授权层的保护,例如 gitolite )
Not with GitHub in the same repo.
(as opposed to local repos, which can be protected by an authorization layer like gitolite)
您可能会:
- 一个用于生产和主分支的仓库,只有产品团队作为合作者(如果需要其他人的帮助,他们可以分叉该仓库)
- 团队其他成员的其他(更多公共")分支机构的一个仓库.
更新:我仍然希望有两个存储库,但是您现在(2015年9月)可以保护GitHub上的分支.
请参阅" 如何在github中保护主"? ".
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?".
这篇关于GitHub:限制访问特定分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文