We are following the recommendations from this answer when rewriting our Bitbucket repository history with BFG, in particular closing all open PRs and getting rid of PR refs:
We are then, however, attempting to push the locally rewritten content up to the same repository.
When we try this, it isn't just the PR refs that fail to upload. Every ref -- tags, branches, etc. -- returns an error during the push.
For the PR refs that we deleted, we get this error:
You are attempting to update refs that are reserved for Bitbucket's pull request functionality. Bitbucket manages these refs automatically, and they may not be updated by users.
For the refs that were rewritten but not deleted, each one has an error such as this:
! [remote rejected] thumb-events -> thumb-events (pre-receive hook declined)
Is there really no setting or command etc. that could be used to make the Bitbucket repository accept these rewritten or deleted refs?
The original answer did say to push to a new repository, but before we go that route, we'd like to make sure there's no other way.
Happy to supply any more details.
Thanks!