how to remove local committed changes in git code example Example: revert unpublished commits git reset --hard