Replacing trunk with branch in Subversion

前端 未结 6 702
梦谈多话
梦谈多话 2020-12-25 11:25

Let\'s say people have been working on the trunk and on a branch of a Subversion repository. I want to discard any changes on the trunk, and replace it with a copy of the br

6条回答
  •  情歌与酒
    2020-12-25 12:07

    trunk       remplace (trunk with your branch)
    *----x      * ---->
     \          |
      \         |
       *--------|
         branch 
    

    This branch was created from trunk so be careful of do not delete brutally the trunk (problems with the ancestry). First make a tag with your trunk, your backup, in any case...

    I suggest do like this:

    Using Eclipse SVN

    1. click right > Team Branch/tag (create a tag - your backup)

    2. Team > switch another branch/tag ... select your branch, be sure that the branch is correctly loaded.

    3. in the branch : Team > disconnect. Delete SVN info.

    4. Team > share project ... choose your trunk.

    5. Team > commit in your trunk.

    6. click right ... select Compare with.. Branch/tag -> look for your branch. If everything is OK you will have : "There are no differences between the selected inputs."

    I hope it helps.

提交回复
热议问题