Git Clean
git_cleanClean untracked files from Git repositories with built-in safety controls. Preview deletions using dry-run mode, or force-remove files, directories, and ignored content.
Instructions
Remove untracked files from the working directory. Requires force flag for safety. Use dry-run to preview files that would be removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| force | No | Force the operation, bypassing safety checks. | |
| dryRun | No | Preview the operation without executing it. | |
| directories | No | Remove untracked directories in addition to files. | |
| ignored | No | Remove ignored files as well. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| filesRemoved | Yes | List of files that were removed. | |
| directoriesRemoved | Yes | List of directories that were removed. | |
| dryRun | Yes | Whether this was a dry-run (preview only). |