SVN Branching over SSH (SVN+SSH)

SVN Branching over SSH (SVN+SSH)

Last updated:

svn copy is the command you use to create a branch. Suppose, for the sake of example, that your repo is located in server myserver (you access it with username johndoe on path/svnroot/company/trunk/my-project)

Create the branch:

$ svn copy svn+ssh://johndoe@myserver/svnroot/mycompany/trunk/myproject svn+ssh://johndoe@myserver/svnroot/mycompany/branches/weird-experiment-on-myproject

(At this point you may be prompted for a password, if you're not using Private Keys to log into the remote server.)

Point your working directory to your branch (commits will now be sent to your branch rather than your regular repo)

$ svn switch svn+ssh://johndoe@myserver/svnroot/mycompany/branches/weird-experiment-on-myproject

And to Switch back to your original repo:

$ svn switch svn+ssh://johndoe@myserver/svnroot/mycompany/trunk/myproject

miscellaneous

To check what URL your working directory is currently pointing to, run $ svn info

references