git delete pushed commit from remote code example
Example 1: cancel a commit not pushed
git reset --soft HEAD~
Example 2: remove commit not pushed
git reset --hard origin/main
git reset --soft HEAD~
git reset --hard origin/main