Cleaning the workspace
Occasionally, it's necessary to clean a workspace of any generated, intermediate and temporary files.
- The local build is misbehaving or flaky
- Local tools are getting confused by outdated artifacts
- CI/CD will want to start from a known state
For this, there is a standard
dotnet command that clears all output and intermediate folders. This command does not clear the
.vs caching folder.
If you want to clean out everything that hasn't been committed, you can use
git clean -x -d -f -f
This will clear out all files (and folders, including empty ones) that do not belong to the workspace.