Removing .svn folders from project for deployment
-
03-07-2019 - |
Question
I'm using subversion (TortoiseSVN) and I want to remove the .svn folders from my project for deployment, is there an automated way of doing this using subversion or do I have to create a custom script for this?
Solution
TortoiseSVN has an export function. This will create the entire SVN tree elsewhere without the .svn
folders.
Also, a lot of FTP clients have filtering, which you can add .svn
to just in case you forget one day.
OTHER TIPS
Use
svn export <url-to-repo> <dest-path>
It gets just the source, nothing else. Look in svn export (in Version Control with Subversion) for more information.
No need for a script. As suggested, use the Export command:
- Right click on the top level of your working copy.
- Open the TortoiseSVN sub-menu
- Select Export
- Follow on screen dialogs.
But if you don't want to use svn export (for whatever reason)...
find /path/to/project/root -name '.svn' -type d -exec rm -rf '{}' \;
On a computer:
rsync -avz --exclude=".svn" /yourprojectwithsvninside/ /yourprojectwithoutsvninside/
From the repository:
svn export http://yourserver/svn/yourproject/ ./yourproject/
public static: yes FileZilla has filename filtering. Look under View -> Filename Filters. I checked in v3.1.1
I think most FTP clients have it now.
Windows Vista / 7: turn on view hidden folders and files. In the search box (top right in a Windows Explorer window), write .svn
. All .svn
folders will show at top, delete them all and turn hide files back on.
Do svn export <url>
to export a clean copy without .svn folders.
Use the export feature.