How do I remove a folder from source control with TortoiseSVN?

SvnVersion ControlTortoisesvn

Svn Problem Overview


How do I remove a folder from being source controlled with TortoiseSVN?

Svn Solutions


Solution 1 - Svn

The easiest way is described here: http://tortoisesvn.net/unversion.html

That article is a bit wordy and some of the methods didn't work for me (like dragging the folder onto itself - Windows 7 wouldn't allow it)).

Here's what, in the article worked for me:

> Simple: when you right-click on a > working copy and choose > "Export..." from the context menu, > a folder browse dialog is shown where > you can choose the folder where you > want the working copy exported to. If > you now select the very same path > that your working copy is on as the > target (i.e., you're exporting the > working copy onto itself), TortoiseSVN > will remove all .svn folders of that > working copy.

Solution 2 - Svn

There is a dedicated item in the extended context menu:

  • Hold the Shift key down and right click on the folder.
  • Under the TortoiseSVN menu click on "Delete (keep local)"

enter image description here

Image cropped from TortoiseSVN's extended context menu page.
Delete (keep local) documentation blurb.

Solution 3 - Svn

If you want to remove the folder from source control but keep it locally, the easiest way would be to

  1. create a backup of the folder (just copy it somewhere else)
  2. follow the instructions for deleting it
  3. restore the folder
  4. tell subversion to "Ignore" the folder

You should also delete the .svn directory that's kicking around in the folder that you're removing or you'll end up confusing svn/tortoise. You can also do an "Export" for step 1 which will remove any .svn directories for you (if you're doing this for a whole directory tree rather than a single directory, this is a lot more convenient than cleaning the folders out by hand).

Solution 4 - Svn

The TortoiseSVN menu has an Export option which will give you a copy of the folder detached from the repository. Alternatively, you can right-click + drag a folder and pick either "SVN Export to here" or "SVN Export all to here".

"Export all" is equivalent to selecting "Export unversioned files too" in the Export dialog, which will effectively clone the working copy without the .svn folders.

Solution 5 - Svn

You right click on the directory, go to TortoiseSVN -> Delete. You then right click on the parent directory and SVN Commit... and that will remove the folder.

Solution 6 - Svn

Delete the .svn folder within the folder you want to remove from version control.

Solution 7 - Svn

Windows Search, set system and hidden files flag... filename ".svn" ... after it searches - sort so all .svn directories are grouped together... highlight - hit delete :)

Solution 8 - Svn

I ran the tortoise command "Update to SVN 1.7" which took all the .svn folders and combined them into a single folder. I was then able to delete just the one .svn folder and everything was good to go!

Solution 9 - Svn

I see there are three simple methods to unverison and keep a local version of a file (or a directory) with TortoiseSVN:

  1. Exporting on the same path as Stefan wrote;
  2. "delete (Keep local)" function accessed with Shift key as bob esponja's answer;
  3. Unversion and add to ignore list option which I am reporting with this answer

I find the latter method the easiest of the three, while the first one (the most voted) the longest in terms of operations to perform.

Solution 10 - Svn

This is what worked for me:

  1. Right click on the folder/branch that you want to delete and use TortoiseSNV->Delete
  2. Perform a cleanup. I did this from the commandline, svn cleanup <path to the folder to delete including folder name>; otherwise you can do the same right click on the folder and perform a cleanup.
  3. Go to the parent directory of the folder you want to delete and commit the changes.

This should remove the folder from your working directory and from Subversion.

Solution 11 - Svn

Exporting the folder to a new location while "Export unversioned files to" option selected worked great for me. TortoiseSVN removes all the Subversion specific settings and you get a clean folder. Now you can delete the original one and move the new exported folder there.

Solution 12 - Svn

Once in awhile I run into working copy folders from Subversion that I know longer want under version control. I want to “unversion” them. Usually I do some kind of find and delete on all the .svn related folders but there is an easier way if you have TortoiseSVN installed.

You should be familiar with the “Export” command. This will make a copy of the files in a new location without all those pesky .svn folders. If you want to ‘unversion’ something but don’t want a copy – simply do an “export” and when Tortoise asks for the “folder to export to” simply select the same folder your working copy is in! Tortoise will proceed to remove all the .svn folders.

Quote: http://thecrumb.com/2008/09/25/removing-svn-files-with-tortoisesvn/

Solution 13 - Svn

Right-click on a working copy and choose "Export..." from the context menu. A folder browse dialog is shown.

You must choose the same path that your working copy is on as the target. TortoiseSVN will ask you if you want to remove all .svn folders of that working copy. Just says yes!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChanceView Question on Stackoverflow
Solution 1 - SvnStefanView Answer on Stackoverflow
Solution 2 - Svnbob esponjaView Answer on Stackoverflow
Solution 3 - SvnAwesomeTownView Answer on Stackoverflow
Solution 4 - SvndahlbykView Answer on Stackoverflow
Solution 5 - SvnSean BrightView Answer on Stackoverflow
Solution 6 - SvnakerraView Answer on Stackoverflow
Solution 7 - SvnJason P SageView Answer on Stackoverflow
Solution 8 - SvnjhildenView Answer on Stackoverflow
Solution 9 - SvnZacView Answer on Stackoverflow
Solution 10 - SvnzenView Answer on Stackoverflow
Solution 11 - SvnRehan FarooqView Answer on Stackoverflow
Solution 12 - SvnwinView Answer on Stackoverflow
Solution 13 - SvnHeyjeeView Answer on Stackoverflow