I'm done with a branch and wish to delete it. It is not the default branch. Using git from the command line yields a "deletion prohibited" error.
$ git push origin :hotfix/DEV-12345 remote: error: denying ref deletion for refs/heads/hotfix/DEV-12345 To git@bitbucket.org:acme/product.git ! [remote rejected] hotfix/DEV-12345 (deletion prohibited) error: failed to push some refs to 'git@bitbucket.org:acme/product.git'
I don't see a way to delete the branch in the browser UI. Is there anything else I should try?
Both of the above commands are good.
The problem as it turns out was a configuration problem with our Bitbucket instance - the Atlassian folks corrected the configuration and now we can delete branches.
Hi Rich,
Please try the following:
git push origin --delete <branchName>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Jesse. I had tried that also and, unfortunately, got the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note: I'm the creator of this repository so I'm assuming that I have all of the admin permissions one should have to delete a branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.