Separate the exclude patterns with
-e
.
git clean -xfd -e *.js -e *.map -n
That will delete everything except
*.js
and
*.map
files. The
-n
does a dry-run to be safe.
See
git clean -h
for more details.