remove commit from server git code example
Example 1: delete a pushed commit
# delete the last commit
$git reset –hard HEAD~
Example 2: git delete last commit in remote
1
$git rebase -i HEAD~2
# delete the last commit
$git reset –hard HEAD~
1
$git rebase -i HEAD~2