SVN+SSH Bash Command
Recently I stopped using Apache’s dav_svn, and moved to svn+ssh for my Subversion server which I store personal code on. However, it made the checkout command much, much bulkier to type.
So I created a very, very, painfully simple bash function to fix this for me. It works if all of your SVN repos are in relatively the same place.
function svnco() {
svn co svn+ssh://[email protected]/SVN_REPO_LOCATION/$1
}So for example, your final code could be:
function svnco() {
svn co svn+ssh://[email protected]/var/svn/$1
}The repo location is literally where the repo is stored on the server. It could be /home/subversion or /var/www/svn if you are moving from Apache.
This code goes into your .bash_aliases file, so that it is loaded with the .bashrc config file.
Then, run svnco mytestrepo, and it will checkout mytestrepo to your development machine to start working.