Git Clean
Remove untracked files and directories
Git clean removes untracked files from your working directory. It helps you get back to a pristine state.
Preview what would be removed without deleting anything. Always do this first.
Working Directory
src/app.jstracked
src/utils.jstracked
build/ignored
temp.loguntracked
debug.txtuntracked
dist/untracked
node_modules/ignored
.env.localignored
Terminal
$ git clean -n Would remove debug.txt Would remove temp.log # -n or --dry-run: show what would happen # Only untracked, non-ignored files are listed