This looks like Gerrit's answer, as shown in the parseDelete () function .
private void parseDelete(final ReceiveCommand cmd) { RefControl ctl = projectControl.controlForRef(cmd.getRefName()); if (ctl.canDelete()) {
This is a reference to the push policy managed by Gerrit .
This category defines how users are allowed to upload new commits to projects in Gerrit.
Failure from existing branches is rejected. This is the safest mode since commits cannot be discarded .
Therefore, if you do not activate the "Force" parameter in this Gerrit category, you cannot delete the branch on this server.
source share