Search code examples
svnversion-controlsshsftpsvn-export

Is it possible to export specific files from svn to an ssh/sftp server?


Instead of manually downloading files from SVN (via checkout) and then copying them to the sftp server via csp or an FTP GUI, is there an svn command that can export those files straight to an sftp server?

For example:

svn export https://mysvnserver/folder/somefile.php sftp://somesftpserver/somepath/somefile.php

Solution

  • No, there isn't. While svn supports different protocols for the server connection, the working copy is always located on the local file system.

    However, you can create a post-commit hook that will execute after each commit and e.g. upload the new version of your repository to an ftp server etc. Have a look at https://subversion.apache.org/faq.html#website-auto-update or Google for it.