Created
April 20, 2011 15:27
-
-
Save djcsdy/931645 to your computer and use it in GitHub Desktop.
Powershell script to delete all unversioned files from an SVN working copy, including ignored files. Roughly equivalent to git clean -f -x. 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 --no-ignore | | |
Select-String '^[?I]' | | |
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