how to undo last commit on remote code example Example: revert last push to server git reset --hard HEAD@{1} git push -f