I've looked at Resetting remote to a certain commit and it no longer seems to work.
I have a repo that's in sync with remote master. The remote is not seen by anyone else, so I feel okay with doing this: I want to remove the last commit from the remote (and re-apply an amended commit). I try the formulas I see there and get errors. Example:
kevin@camelot-x:~/Desktop/Projects/qubic/qubist$ git push --force origin 105bd79119e069b9a1678d37c47a7e66db5b858a:master
Password:
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://kogorman@git.code.sf.net/p/qubic/git
! [remote rejected] 105bd79119e069b9a1678d37c47a7e66db5b858a -> master (non-fast-forward)
error: failed to push some refs to 'ssh://kogorman@git.code.sf.net/p/qubic/git'
kevin@camelot-x:~/Desktop/Projects/qubic/qubist$
Other formulas give essentially the same complaint.