Hands-on task
Clean out only the ignored junk
In /root/repo, junk has piled up after a build. There are tracked files (src.c, .gitignore), there are ignored build artifacts (app.o, cache.tmp, the build/ directory), and there are untracked but needed files that aren't in .gitignore (keep.txt, notes.md). Remove all the ignored junk from the working tree and only it: the tracked files and the untracked-but-needed ones must remain untouched.
- git clean
- untracked files
- gitignore
- dry run
- cleaning the working tree