Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN Export Folder Files Only

Tags:

svn

I have a folder in a repository:

svn/Repo/trunk/Folder

And I want to export all the files in Folder to a local directory:

C:\AnotherFolder

If I do an export from the repository to the local folder, it exports all files including the parent folder, so I end up with the structure:

C:\AnotherFolder\Folder\file1 
C:\AnotherFolder\Folder\file2 
etc

How can I export without the parent directory? So I get something like:

C:\AnotherFolder\file1 
C:\AnotherFolder\file2
like image 522
prestomanifesto Avatar asked Apr 19 '12 16:04

prestomanifesto


People also ask

How do I export a directory from svn?

Another way to export from a working copy is to right drag the working copy folder to another location and choose Context Menu → SVN Export versioned items here or Context Menu → SVN Export all items here or Context Menu → SVN Export changed items here. The second option includes the unversioned files as well.

How copy folder from svn to local?

The easiest way to copy files and folders from within a working copy is to use the right drag menu. When you right drag a file or folder from one working copy to another, or even within the same folder, a context menu appears when you release the mouse.

What does svn export command do?

Description. The first form exports a clean directory tree from the repository specified by URL —at revision REV if it is given; otherwise, at HEAD , into PATH . If PATH is omitted, the last component of the URL is used for the local directory name.

What is the difference between svn checkout and export?

They are the same except that Export doesn't include the. svn folders and Checkout does include them. Also note that an export cannot be updated.


1 Answers

You should be able to do that with the following SVN command:

svn export http://.../svn/Repo/trunk/Folder C:\AnotherFolder

This should also work with a relative path for AnotherFolder like this:

svn export http://.../svn/Repo/trunk/Folder AnotherFolder
like image 196
Bradford2000 Avatar answered Oct 01 '22 13:10

Bradford2000