Clean Up unversioned files in svn

Sadly until svn 1.9 released we will never get cleanup command with delete unversioned file option. So this is oneliner from seth reno
svn status | grep ^\? | cut -c9- | xargs -d \\n rm -r
or if you in windows you can use it, make sure you have cygwin installed in your system
svn status | grep ^\? | cut -c9- | xargs -d \n rm -r

update :

Also in Windows you could use TortoiseProc, to invoke tortoisesvn cool cleanup feature :

TortoiseProc.exe /command:cleanup /closeonend:2 /path:”%WORK_DIR%” /revert /delunversioned /delignored /refreshshell /externals /nodlg /noui

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s