git delete all commits in remote branch code example
Example 1: delete a pushed commit
# delete the last commit
$git reset –hard HEAD~
Example 2: delete a pushed commit
$git log --pretty=oneline --abbrev-commit
# delete the last commit
$git reset –hard HEAD~
$git log --pretty=oneline --abbrev-commit