Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pushing modified history to same repo - all refs fail. Any way to fix?

Andrew Pontious
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2019

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:

https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-reserved-refs-when-cleaning-up-with-BFG-tool/qaq-p/702969#M22269

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!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events