Class ResetCommand

  • All Implemented Interfaces:
    java.util.concurrent.Callable<Ref>

    public class ResetCommand
    extends GitCommand<Ref>
    A class used to execute a Reset command. It has setters for all supported options and arguments of this command and a call() method to finally execute the command. Each instance of this class should only be used for one invocation of the command (means: one call to call())
    See Also:
    Git documentation about Reset
    • Constructor Detail

      • ResetCommand

        public ResetCommand​(Repository repo)
        Parameters:
        repo -
    • Method Detail

      • setRef

        public ResetCommand setRef​(java.lang.String ref)
        Parameters:
        ref - the ref to reset to, defaults to HEAD if not specified
        Returns:
        this instance
      • addPath

        public ResetCommand addPath​(java.lang.String path)
        Parameters:
        path - repository-relative path of file/directory to reset (with / as separator)
        Returns:
        this instance