how to delete a commit from master branch code example Example: git clear commits git reset --hard origin