Joseph Bloggs

Online home of Joseph Talbot: Little Briton

Main menu

Excluding hidden svn metadata files when zipping up a directory

19 April 2013 - 9:50am -- Joseph

Ever wondered how to exclude .svn files from a directory you want to zip? My colleague just showed me this command (thanks James!), which I record here for future reference:

zip myzipfile.zip -r mydirectory/ -x \*.svn\*

Yes, I know I could export from the repository:

svn export directory ~/svn-exports/new-directory

but it's useful to know another method.

Please note: the zip command is a Unix command so won't work on Windows, sorry... (Works on Mac though)