TOOL » GIT

Clean

Usage

Remove untracked files from the working tree.

shell
git clean OPTIONS TARGET
OptionDescription
-dRecurse into untracked directories. Not needed when TARGET is a directory.
-f --forceDelete files without asking.
-i --interactiveAsk before deleting files.
-n --dry-runDon't do anything, just show what would be done.
-q --quietOnly report errors.
-e --excludeUse the given exclude pattern in addition to the standard ignore rules (.gitignore).
-xDon’t use the standard ignore rules (.gitignore).
-XRemove only files ignored by Git.