I made an unintended commit and pushed to the remote. But then I wanted to undo it. So I executed:
git reset --hard HEAD^
HEAD is now at b760747 random commit
Then I made some changes and attempted to add+commit+push it. But it failed with the following error message:
! [rejected] postacl -> postacl (non-fast-forward) error: failed to push some refs to (repository-url)
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
How can I get everything back to normal?