英文:
How do I allow users to only delete branches that they created
问题
如何将分支删除限制为仅限用户创建的分支?
我在寻找一个允许用户只删除他们创建的分支的设置时遇到了问题。目前,我只能允许用户删除所有分支或不删除任何分支。我是否忽略了某个设置或有没有办法实现这个目标?
英文:
How can I restrict branch deletion to only branches created by the user?
I'm having trouble finding a setting that allows users to only delete the branches they created. Currently, I can only allow a user to delete all branches or no branches. Is there a setting I'm missing or a workaround to achieve this?
答案1
得分: 2
你需要强制推送权限才能够删除分支。这是在仓库级别上设置的,不区分各个分支。因此,这个设置要么全部开放,要么全部关闭。
英文:
You need Force push permission to be able to delete branches. It is set on the repository level and doesn't distinguish per branch. So you gain all or nothing with this setting.
答案2
得分: 0
Force push(强制推送)需要用来删除分支,并且它可以在分支级别进行定义 - 但仅在分支创建之后才能定义。
我认为,分支的创建者应该能够默认删除它。
英文:
Force push is needed to delete branches, and it CAN be defined at branch level - but only after the branch is created.
This should be a default IMHO that creator of a branch should be able to delete it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论