How can I delete all files that are being ignored within a Subversion checkout? Effectively to bring it back to the equivalent of a pristine checkout.
+3
A:
I use this script when I want to clean out a working copy. It removes all unknown and ignored files.
svn status --no-ignore | awk '$1=="?"||$1=="I" { print $2 }' | xargs -i rm -rf {}
karoberts
2010-08-24 09:36:05
It was Unix after all :)
Álvaro G. Vicario
2010-08-24 12:02:10
+3
A:
If TortoiseSVN, you can Check for modifications
, Show ignored files
, right click and delete.
Álvaro G. Vicario
2010-08-24 09:39:48
A:
You may want to first reverse the ignore state of those files (ref http://stackoverflow.com/questions/1326649/how-do-i-unignore-a-file-in-tortoisesvn for details) and then you can delete and commit back the changes from your workspace methinks.
Critical Skill
2010-08-24 09:48:04
A:
Here's another way of doing it.
svn status --no-ignore | grep "^[\?I]" | sed 's%^........%%' | xargs -d "\\n" rm -rv
pauldoo
2010-09-13 12:45:07