On Bitbucket, using the Bitbucket web interface, I sync'd a blessed repo with my own private fork in error. I wanted to rewrite history on the blessed repo to bring it back to the correct commit.
I cloned the blessed repo that contained my incorrect commits and locally ran
git reset --hard HEAD~1
on the branch whose history was screwed up.
This brought the cloned repo back to the commit it was at before I screwed it up.
I then went to push my repo back up to Bitbucket using
git push -f origin development
but got the following error
remote: permission denied to force push branch development
To [email protected]:blessed-repo/blessed-repo.git
! [remote rejected] HEAD -> development (pre-receive hook declined)
error: failed to push some refs to '[email protected]:blessed-repo/blessed-repo.git'
Why did I get this error and how can I make the git push
work?