How do you Tar an svn directory and filter out all the .svn files?

tar --exclude=.svn -z -c -v -f mytarball.tar.gz mydir/

you can use the svn Export function to get a clean version of the files without the .svn folders.

Do this in a different location than your working copy.


If you have a tar version 1.28 or later, try

tar --exclude-vcs

It can be used to backup directories containing:

  • a single svn repo
  • multiple svn repos
  • no svn repos

From the manual:

‘--exclude-vcs’ Exclude files and directories used by following version control systems: ‘CVS’, ‘RCS’, ‘SCCS’, ‘SVN’, ‘Arch’,‘Bazaar’, ‘Mercurial’, and ‘Darcs’.

Note:

For some versions of tar, --exclude-vcs must be the first argument.


use svn export command to make a clean copy of the local sandbox.

http://svnbook.red-bean.com/en/1.0/re10.html

svn export [-r REV] URL [PATH]

svn export PATH1 PATH2

Tags:

Svn

Filter

Tar