how to reset all go ahead commits in local code example Example: revert unpublished commits git reset --hard <hash-or-ref>