Skip to main content

Module rm

Module rm 

Source
Expand description

mkit rm <pathspec>... — remove paths from the worktree and stage the deletion for the next commit.

Mirrors git rm:

  • default — stage the deletion AND delete the worktree file(s);
  • --cached — stage the deletion only, leaving the worktree intact;
  • -r/--recursive — required to remove a directory’s entries;
  • -f/--force — override the safety guard that refuses to destroy a tracked file whose worktree content differs from the staged blob.

Multiple pathspecs may be given. The safety guard reuses the same “don’t clobber user work” spirit as the #176 restore guards: a tracked-but-modified file is not deleted without --force.

Functions§

run