Last Updated: February 25, 2016
· jasdeepkhalsa

Export an SVN repo to a web directory using the command-line

Note: SVN always requires a protocol. This example uses the "https://" protocol, but "http://", "svn://" and "svn+ssh://" are all supported for remote repos.

These commands overwrite the public folder using the "--force" command. If a file exists it will be overwritten, but all other files in a directory will be preserved:

  • svn export https://svn.domain.co.uk/project/ /home/user/public/ --force

Or alternatively for exporting local repos to a local folder use the "file://" protocol:

  • svn export file://$HOME/svn/project/ $HOME/staging.website.co.uk/ --force