CmdID

CmdID / Commands

git-clean

Remove files not tracked by Git from the working tree. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Interactively delete untracked files

git clean --interactiveIdentify

Simulate the cleanup, showing which files would be deleted

git clean --dry-runIdentify

Immediately force deletion of all untracked files

git clean --forceIdentify

Delete untracked directories

git clean --force -dIdentify

Delete only untracked files matching specific paths or glob patterns

git clean --force -- path/to/directory '*.ext'Identify

Delete untracked files except those matching the given patterns

git clean --force --exclude '*.ext' --exclude path/to/directory/Identify

Delete untracked files and excluded files (those listed in .gitignore and .git/info/exclude)

git clean --force -xIdentify