git分支权限 [英] git branch permissions

查看:2014
本文介绍了git分支权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用git bash设置分支权限?我想在主分支上拥有更严格的权限,以便有些人可以使用开发分支并对其进行提交,并且可能不会自行更改主分支。

Is it possible to set branch permissions using git bash? I would like to have much more strict permissions on the master branch, so that some people can use the development branch and commit to it and may not change the master branch themselves.

如果可能的话,我该如何去做这件事?

If it is possible how would I go about trying to do it?

推荐答案

Git没有分支特定的权限。您可以将整个存储库只读给人们或创建一个私人和一个公共存储库,只将开发分支推送给公众,同时只将主人保存在私人存储库中。

Git does not have branch specific permissions. You can either make the whole repository read only to the people or create one private and one public repository and only push the development branch to the public on while keeping the master only in your private repository.

编辑:
对于分支机构特定的权限,您需要一个服务器端授权层,如 Gitolite - 显然,这需要您管理自己的Git服务器。

For branch specific permissions, you need a server-side authorization layer like Gitolite — obviously, this requires you to be managing your own Git server.

这篇关于git分支权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆