"Un-SVN" - working copy

I have a folder that is my working copy. How to remove all SVN functions from this folder? There is a reason why I am doing this, somehow my main folder, which contains all my working copies of sites, somehow turned into a working copy, so I have a working copy as such.

So, is there an easy way to remove version control from a folder?

+47
svn tortoisesvn
Oct 08 '08 at 14:42
source share
14 answers

Just delete all the ".svn" folders. What is it.

+32
Oct 08 '08 at 14:44
source share

svn export is the command you are looking for. You can export a managed set of files to an uncontrolled location and use it.

+47
Oct 08 '08 at 14:45
source share

If you used * nix-like tools:

find . -type d -name .svn -print0 | xargs -0 rm -fr 
+23
Oct 10 '08 at 1:19
source share

If you use TortoiseSVN, you can just right-click on the root folder of your working copy and click Export ... This will work even if you have unreplied changes.

Similarly, you can simply export from your repository, and it will not create any of the .svn folders.

Another simple approach is to simply delete all .svn folders, as mentioned earlier.

+13
Oct 08 '08 at 14:48
source share

You can manually delete all .svn folders (be sure to do this for each subfolder) or use a simple utility such as the Jon Gallaway shell command .

+4
Oct 08 '08 at 14:44
source share

The Windows client "TortoiseSVN" has the "Export" function. Export creates a copy elsewhere in another folder without all of these ".svn" folders in them. You can export either from the repository or from a local copy with the option to include untranslated files.

+4
Oct 08 '08 at 14:48
source share

how about this:

 for /f "tokens=* delims=" %%i in ('dir /s /b /a:d ".svn"') do rd /s /q "%%i" 

to recursively delete all .svn folders -

(if the export function is not an option for you, it is not available in the repository, etc.)

+4
Oct 08 '08 at 14:51
source share

TortoiseSVN has the ability to export files without binding to subversions - right-click on the repository (or in the directory in the repository), then in TortoiseSVN, then in Export. Another way to do this is to delete all .svn directories in all folders.

+3
08 Oct '08 at 14:46
source share

Here is a Windows script package that will remove all .svn folders from the Subversion working copy directory:

 @echo off rem cleanup .svn subdirs setlocal enabledelayedexpansion rem change to directory that this batch script resides in if "%~1"=="" ( echo Usage: svncleanup svn_working_copy_dir exit /b 1 ) echo cleaning up .svn subdirs in "%~1" ... for /R "%~1" %%I in (.svn) do rmdir /Q /S "%%I" > NUL 2>&1 
+3
Jul 25 '09 at 13:57
source share

With TortoiseSVN, you can right-drag a folder and then select the "SVN Export All to here" command.

+2
Oct 08 '08 at 14:46
source share

I just use Windows Explorer to search for ".svn" (starting from the top of my working copy), and then I select all the folders found and delete them.

+2
Apr 23 '10 at 13:53 on
source share

Export to a place with a turtle

When I read all of the above suggestions, I cringed because my source files are 3 GB, with many.svn folders.

Select "Export" from the "R-click" context menu, and when the "Where to put a copy" dialog box appears, select the same folder . OK. Viola, the entire source control spinner (recursively) left, instantly.

+2
May 9 '12 at 16:16
source share

Can't you just delete the .svn subfolder?

As far as I know, SVN stores everything about its connection to the repository in this subfolder (at least in windows)

+1
08 Oct '08 at 14:45
source share

As others have said, deleting the .svn folder will remove the SVN functions from this folder. If you do this recursively, you will "un-SVN" your entire WC, which is essentially an export command. I'm not sure if this is a feature of Tortoise, the CLN SVN binary, or both, but I remember that one of them allows you to export locally, which literally deletes .svn folders from WC. Regular export creates a copy of your toilet in a new location that has not been converted.

+1
Oct 08 '08 at 14:50
source share



All Articles