Created
March 17, 2011 16:03
-
-
Save djcsdy/874592 to your computer and use it in GitHub Desktop.
Powershell script to delete files from an SVN working copy that are neither version-controlled nor ignored. Roughly equivalent to git clean -f. Requires the command-line svn to be located in your %PATH%.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn status | | |
Select-String '^\?' | | |
ForEach-Object { | |
[Regex]::Match($_.Line, '^[^\s]*\s+(.*)$').Groups[1].Value | |
} | | |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment