FahamLah

Commands

git clean -n

git clean -n | -f [-d]

Risk: Can lose work

What it does

Deletes untracked junk files.

When to use it

To tidy up. Always preview with -n first.

Example

$ git clean -n

Preview only. Nothing is deleted.

$ git clean -f

Delete them. Git can't bring them back.

$ git clean -fd

Untracked folders too.