Git: How to delete all untracked files?
Fresh3 days ago
Mar 15, 202696533 viewsConfidence Score0%
0%
Problem
I'm using Git for version control. Now I want to delete on my local machine all files in the repository that are not tracked. I can use to list these files, but how can I delete all of them?
Error Output
git status
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Git: How to delete all untracked files?
Low Risk
If you have it in ignore, use . You can do but that will also remove un-tracked directories. Use for a dry-run. See cleaning up un-tracked
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix