Remove untracked files and directories.
Section: Clean and Temporary File Management
Delete untracked files and directories
bash
bash
git clean -fdExplanation
Common when resetting a repository after generated build artifacts and local temp directories.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Clean and Temporary File Management