我们正在寻找使用gitolite和git但我们正试图找到一种方法来阻止开发人员将代码推送(提交)到repo的发布分支
我们希望仅允许开发人员访问主分支和开发分支。这可以用gitolite完成吗?怎么样?
答案 0 :(得分:2)
是的,这正是gitolite的用途。成为开发人员小组:
@developers = <list of developers>
@releasers = <list of people allowed to push to release branch>
然后设置访问规则:
repo <reponame>
RW release = @releasers # allow @releasers access to release branch
- release = @developers # deny @developers access to release branch
RW master = @developers # allow @developers access to master branch
RW development = @developers # allow @developers access to development branch
- = @all # deny all other permissions
或者你认为合适的事情更复杂。