rollback all local commits and pull from the original branch code example Example: revert unpublished commits git reset --hard <hash-or-ref>