Commands.app

git clean

Workflow

Remove untracked files

Options & Flags
Available options for this command
-n

Dry run (show what would be deleted)

-f

Force removal

-d

Remove directories too

Examples
Common usage examples

Show what would be removed

git clean -n

Remove untracked files and directories

git clean -fd
Notes
  • Always run with -n first to preview
  • Cannot be undone