$ git commit --amend -m "New message"
$ git push --force repository-name branch-name
example,
$ git commit --amend -m "New message"
$ git push --force [email protected]:<username>/<reponame>.git master
$ git commit --amend -m "New message"
$ git push --force repository-name branch-name
example,
$ git commit --amend -m "New message"
$ git push --force [email protected]:<username>/<reponame>.git master