git clean
WorkflowRemove untracked files
Options & Flags
Available options for this command
-nDry run (show what would be deleted)
-fForce removal
-dRemove directories too
Examples
Common usage examples
Show what would be removed
git clean -nRemove untracked files and directories
git clean -fdNotes
- Always run with -n first to preview
- Cannot be undone