Exlude/Separate SVN folders

Filed Under (SVN) by khawaib on 08-12-2009

Tagged Under : , , , , , ,

Subversion created hidden .svn folders in all the directories to keep track of changes. These folders can become a headache when it comes to copy a project from one directory to another.

These folders can also become a security issue.

There are many ways solve this problem.

1. Use export feature of Eclipse and it will not export any of the .svn folders.

2. Use copy commands on Win or Linux

tar --exclude='.svn' -c -f - /path/to/sourcedir/* | (cd /path/to/destdir ; tar xfp -)
rsync -r --exclude=.svn /home/user/progname/ /home/user/progname.copy

3. Robocopy

4. Ignore files and folders from repository

Hide .svn folders from Appache

Filed Under (SVN) by khawaib on 08-12-2009

Tagged Under : , , ,

Use following directive in our httpd.conf to prevent Apache from descending into .svn folders.

# Disallow browsing of Subversion working copy administrative dirs.
<directorymatch "^/.*/\.svn/">
    Order deny,allow
    Deny from all
</directorymatch>