how to delete remote commit code example Example 1: delete remote commit git reset --hard git push --force Example 2: delete remote commit git reset --hard