Search This Blog


Wednesday, December 24, 2008

How to Delete Projects/ Get a Clean Copy of Projects from TortoiseSVN

You have a project under SVN source control, and you have the TortoiseSVN client application installed. One day you wake up, you realize that it's time to publish the project to your website, or to pass along that project to your client who knows nothing about source control in general and SVN in particular, but still want the source code because maybe one day he needs someone else to do the maintenance job.

You need to get rid of SVN source control information on that project. Thus the need to delete the hidden .svn folders hiding inside your directory. How to do it?

One obvious way is to delete that hidden folder manually. But this is a tedious task as you need to transverse every folder and do the delete task. Or you can write a script to look for the .svn extension folders and delete those folders that are associated with it. But sadly there are developers who can't write shell scripts, not to mention that writing deleting scripts can be dangerous-- one or two typos can delete the wrong files and folders and blow up your schedule.

With TortoiseSVN it's much easier to free your projects from the SVN source control. All you have to do is to right click on the root directory and click on the Export Command, and choose a directory where you want to export your projects to:

Let's say in this case we export our project to the desktop, you will find that the desktop copy of your project is now free from SVN. Now you can give this copy to your client or publish it to the website. 

Oh, how to remove a project from SVN source control?
That's easy. You can just delete the project folder and you will be alright. 
Another, more elegant way to unversion a project is to right drag the version copy unto itself ( Thanks Stefan for the tip!). 


Stefan Küng said...

Note that you can also make TortoiseSVN simply remove the hidden .svn folders from your existing working copy, without creating an exported copy as explained here:

Soon Hui said...

Thanks, Stefan.

I updated the post to include the link you mentioned.