Skip to main content

Module clean

Module clean 

Source
Expand description

mkit clean — remove untracked files from the worktree (like git clean).

Safety: this is destructive, so — matching git’s clean.requireForce default — it refuses to delete anything unless -f/--force is given; -n/--dry-run previews instead. Without -d, untracked directories are left alone (git semantics). Ignored files are kept unless -x (also remove ignored) or -X (remove only ignored).

Ignore matching uses the shared path-aware matcher (.gitignore + .mkitignore, #256), so -x/-X honor anchored/**/multi-segment patterns and a file under an ignored directory counts as ignored.

Functions§

run