I'm trying to undo some changes that have already been pushed to a remote repository, and I've done so locally with
git reset --hard COMMIT-HASH
But now it won't let me push without pulling first, which of course defeats the purpose. I've tried:
git push -f
Which errors out with:
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To git@xxx.beanstalkapp.com:/yyy.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@xxx.beanstalkapp.com:/yyy.git'
So how do I get my new, correct version of the branch to the remote?