git_clean
Remove untracked files and build artifacts by previewing with dry_run, then confirming deletion. Avoids touching tracked or ignored files.
Instructions
Delete untracked files, or preview them first with dry_run. Use this to remove build artifacts and other untracked clutter, and to answer 'what junk is in this repo?' before deleting. DESTRUCTIVE: requires confirmed=True to delete; dry_run=True previews without deleting, so preview first. Does NOT touch tracked files, ignored files, or stashes — untracked files only; use git_status to see untracked files before deciding what to clean. Best for: removing build artifacts and other untracked clutter. Returns: list of removed or would-be-removed files, or 'No untracked files to clean.'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Show what would be removed without removing | |
| confirmed | No | Explicit confirmation to delete the untracked files | |
| repo_path | No | Path to the git repository, defaults to '.' (the server working directory) | . |
| directories | No | Also remove untracked directories |