How to move a branch in SVN to trunk?

14,759

move the current trunk to some other place (/branch/oldtrunk), then move /branch/mybranch to /trunk. (if what you wanted is to replace current trunk with the branch?)

With the command line client, this can be done with:

svn mv http://path/to/repo/trunk http://path/to/repo/branch/oldtrunk
svn mv http://path/to/repo/branch/mybranch http://path/to/repo/trunk

Note: in the example above, I used paths to operate directly on the server. This is easier for tasks like this, than operating on a working copy.

Share:
14,759
Emerson
Author by

Emerson

Updated on June 07, 2022

Comments

  • Emerson
    Emerson almost 2 years

    how can I move a SVN branch into trunk ?

    The problem I face is, that if I do a move command in SVN (command line or inside Eclipse) I only can move the branch folder into trunk, resulting to have that folder in trunk. But I want to have all content of that branch in the trunk.

    E.g.

    /branch/mybranch/project1,project2,project3
    

    shall be

    /trunk/project1,project2,project3
    

    and not

    /trunk/mybranch/project1,project2,project3
    

    of course with project1,project2,project3 as 3 different projects...

    how can this be done ? Does tortoise help here ? Or is this only possible with moving every project byitself ?