Svn switch from trunk to branch
Short version of (correct) tzaman answer will be (for fresh SVN)
svn switch ^/branches/v1p2p3
--relocate
switch is deprecated anyway, when it needed you'll have to usesvn relocate
commandInstead of creating snapshot-branch (ReadOnly) you can use tags (conventional RO labels for history)
On Windows, the caret character (^
) must be escaped:
svn switch ^^/branches/v1p2p3
In my case, I wanted to check out
a new branch
that has cut recently
but it's it big in size and I want to save time and internet bandwidth, as I'm in a slow metered network
so I copped the previous branch
that I already checked in
I went to the working directory, and from svn info, I can see it's on the previous branch I did the following command (you can find this command from svn switch --help
)
svn switch ^/branches/newBranchName
go check svn info
again you can see it is becoming the newBranchName go ahead and svn up
and this how I got the new branch easily, quickly with minimum data transmitting over the internet
hope sharing my case helps and speeds up your work
You don't need to --relocate
since the branch is within the same repository URL. Just do:
svn switch https://www.example.com/svn/branches/v1p2p3