xxxxxxxxxx
git push origin +HEAD^:<name of your branch, most likely 'master'>
xxxxxxxxxx
git reset HEAD^ # remove commit locally
git push origin +HEAD # force-push the new HEAD commit
xxxxxxxxxx
# Reset your local branch to exclude the last commit
git reset --hard HEAD~1
# Force push the changes to the remote repository, replacing the previous commit
git push --force origin <branch-name>