GistsGitHard Delete CommitOn this pageHard Delete Commit works for both Local and Remote Delete the last commit locally and discard all changes git reset --hard HEAD~1 Force push the changes to update the remote repository git push origin <branch_name> --force-with-lease