how to remove unwanted commits from git code example Example: git clear commits git reset --hard origin