Un-SVN … for those times you just need to start again!

24 09 2007

Download UnSVN which is a little Win32 command line tool which will search for and delete all the hidden .svn or _svn folders in a folder so that you can ’start again’ with your working copy and commit as if it were new.

I have found that a lot of the time we do a BIG merge and are really starting a whole new repository and would like to just blow away the SVN directories from my working copy so that I can just do a fresh check out and commit process to a new trunk or branch.

Its not that sexy so it will try to just do a local delete of .svn if you do not supply any parameters. Instead, try using -help to get a list of options. Not bad for 10 minutes work…

Example:
unsvn -r -u -t c:\developer\newProject

[Note: there was a crazy problem last night where I found that directories and files which were under the .svn folder which were marked as read only would not delete. This was fixed by just changing folder permissions - I found the solution here.]

UPDATED 4/3/2010! I have changed the link in this article to point to VERSION 2 of this great little utility. It traverses large filesystems recursively and works a treat. Download UnSVN version 2.0 to fix your SVN woes! Requires .Net framework 2.0 to be installed.


Actions

Information

Leave a comment