Take the 2-minute tour ×

Is there a way to alter the branch to which a working copy relates?

Another developer has renamed the branch im wokring on, so I cant commit any work any more.

Could I just edit all the .svn directory files to point to the new location?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

You almost answered it yourself, you can do this by relocating:

svn switch --relocate FROM TO

for example

svn switch --relocate http://server/svn/repos/branches/foo \
share|improve this answer
I am getting this error "svn: Relocate can only change the repository part of an URL" when issuing this command. See here: stackoverflow.com/questions/5102758/… –  Lee Netherton Feb 24 '11 at 9:35
I don't think this answer is correct. I believe a simple "svn switch" should do the job if only the name of the branch changed. "svn switch --relocate" is only usefull if the IP-address, hostname, or protocol has changed. Relocating is something that normally should happen only very infrequently. –  Otherside Feb 24 '11 at 9:43
add comment

From the working copy directory:

svn switch http://server/svn/branches/newbranch
share|improve this answer
add comment

Your Answer


