Enum Class PushForce

java.lang.Object
java.lang.Enum<PushForce>
io.github.jbastgen.stemma.git.api.PushForce
All Implemented Interfaces:
Serializable, Comparable<PushForce>, Constable

public enum PushForce extends Enum<PushForce>
How a push may overwrite commits on the remote branch.
  • Enum Constant Details

    • NONE

      public static final PushForce NONE
      Only a fast-forward: commits of the remote branch are never lost.
    • LEASE

      public static final PushForce LEASE
      Overwrite the remote branch only if it is still where the remote-tracking branch says (--force-with-lease): what somebody else pushed after the last fetch is never lost. Needs the remote-tracking branch (fetch first).
    • FORCE

      public static final PushForce FORCE
      Overwrite the remote branch whatever is on it (--force).
  • Method Details

    • values

      public static PushForce[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PushForce valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null