如何保护GIT分支(如主人) [英] How To Protect a GIT branch (like master)

查看:145
本文介绍了如何保护GIT分支(如主人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很喜欢做GIT分支和合并,但想知道我该如何让一个不熟悉合并和分支的新开发人员不会意外伤害发布或生产分支(例如master)。



什么是良好的工作流程,这样一位正在进行大量提交的开发人员可以将他的更新与主人或其他分支同步。也就是说,没有新的开发者对该分支提交特权。 主/支。他们可以分发存储库并提交pull请求以将其更改返回给master。


I'm comfortable doing GIT branching and merging but want to know how I can allow a new developer who is not comfortable with merging and branching to not accidentally hurt a release or production branch (like master for example).

What is a good workflow so that a developer who is doing lots of commits can get his updates synced with a master or some other branch. That is, without the new developer having commit privileges to that branch.

解决方案

Simply don't give the developer commit permissions on the master/branch. They can fork the repository and submit pull requests to get their changes back to the master.

这篇关于如何保护GIT分支(如主人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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