简体   繁体   English

Gerrit 分支删除

[英]Gerrit branch deletion

I used the Gerrit Web UI to create a branch in a project.我使用 Gerrit Web UI 在项目中创建了一个分支。 Now I want to delete that branch, but do not see any "delete" button next to the branch in the Web UI.现在我想删除该分支,但在 Web UI 中的分支旁边看不到任何“删除”按钮。 Can I delete the branch using the Git client?我可以使用 Git 客户端删除分支吗? Or, will attempting to mix Gerrit and Git in branch creation and deletion cause problems for the repo?或者,尝试在分支创建和删除中混合 Gerrit 和 Git 会导致 repo 出现问题吗?

If you don't see the "DELETE" button in the Web UI, probably you don't have "Delete Reference" permission.如果您在 Web UI 中没有看到“删除”按钮,则可能您没有“删除参考”权限。 See more info in the Gerrit documentation here .此处的 Gerrit 文档中查看更多信息。

Answering your question: yes, you can delete a branch using the Git client but you also need to have permission on Gerrit and then execute:回答您的问题:是的,您可以使用 Git 客户端删除分支,但您还需要拥有 Gerrit 的权限,然后执行:

git push origin :<branch>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM