Rejection when deleting remote branch on git

When I try to delete a remote branch, I get the following error:

$ git push work :18300-018_5 remote: Processing changes: refs: 1, done ! [remote rejected] 18300-018_5 (can not delete references) error: failed to push some refs [...] 

Any ideas what this means?

+4
source share
2 answers

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()) { // Let the core receive process handle it } else { reject(cmd, "can not delete references"); } } 

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.

+6
source

What kind of server is this? I assume this is not GitHub, but a custom server that has been specifically configured to prevent branch deletion. Talk with your system administrators about this issue.

0
source

All Articles