how do i undo all my commits code example Example: revert unpublished commits git reset --hard <hash-or-ref>