how to clear outstanding commits in git code example Example: git clear commits git reset --hard origin