git clean

Description

Remove untracked files from the working tree.

Command
git clean
Examples
Dry run (see what would be removed)
git clean -n
Remove untracked files
git clean -f
Remove untracked files and directories
git clean -fd
Parameters
Parameter Type Required Description
-f string No Force removal of files
-d string No Remove directories too
-n string No Dry run (show what would be removed)
-x string No Remove ignored files too
Command Info
Category: File Management
Type: Git
Views: 7
Status: Active
Tags
clean untracked files remove