class UIGit extends VCS implements IVCS {

  @Override
  public void revertPath( String path ) {
    try {
      // Delete added files
      Status status = git.status().addPath( path ).call();
      if ( status.getUntracked().size() != 0 || status.getAdded().size() != 0 ) {
        resetPath( path );
        org.apache.commons.io.FileUtils.deleteQuietly( new File( directory, path ) );
      }

      /*
       * This is a work-around to discard changes of conflicting files
       * Git CLI `git checkout -- conflicted.txt` discards the changes, but jgit does not
       */
      git.add().addFilepattern( path ).call();

      git.checkout().setStartPoint( Constants.HEAD ).addPath( path ).call();
      org.apache.commons.io.FileUtils.deleteQuietly( new File( directory, path + ".ours" ) );
      org.apache.commons.io.FileUtils.deleteQuietly( new File( directory, path + ".theirs" ) );
    } catch ( Exception e ) {
      showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), e.getMessage() );
    }
  }

}