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

qodeninja picture qodeninja · Jan 18, 2011 · Viewed 25.9k times · Source

I'm trying to create a tar file for deployment of some code but I dont want all the .svn files being deployed.

How can I filter these out? They're in multiple directories...

Answer

jakehurst picture jakehurst · Feb 24, 2012
tar --exclude=.svn -z -c -v -f mytarball.tar.gz mydir/