直前を取り消すには
git push -f origin HEAD^:master
ですが、コマンド実行時に下記のエラーがでました。
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
試しに他のコマンドを実行をしても同じ状態です。
最終的にエラーメッセージの通り、作成した鍵に問題がありました。
PuTTYgenで作成していたので、保存するときにPuTTY形式の秘密鍵となります。
windows環境でSourceTreeを使用ではこの秘密鍵は使えるのですが、コマンドプロンプトでは使用できませんでした。知ってる人には当たり前ですかね^^;
鍵の再作成は、
ssh-keygen -t rsa -C "コメント何か入れる"
作成された、id_rsa.pubをGitHubに登録でおkです。