code: public void rollback() throws GitAPIException {
          try (Git git = getGit()) {
              git.reset().setMode(ResetCommand.ResetType.HARD).setRef(HEAD).call();
          }
      }
docs: Reset hard on HEAD.
  
  @throws GitAPIException