Skip to content

removePath

Remove an index entry corresponding to a file on disk.

If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.

Signature

ts
class Index {
  removePath(path: string, options?: IndexRemoveOptions): void;
}

Parameters

  • pathrequired · string

    Relative file path to the repository's working directory.

  • optionsnull | IndexRemoveOptions

    Options for remove an index entry.

    • stageIndexStage

      - Any : Match any index stage.
      - Normal : A normal staged file in the index.
      - Ancestor : The ancestor side of a conflict.
      - Ours : The "ours" side of a conflict.
      - Theirs : The "theirs" side of a conflict.

Released under the MIT License.