Replacing trunk with branch in Subversion

前端 未结 6 708
梦谈多话
梦谈多话 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:05

    Merge all changes from the branch to the trunk, and then resolve all conflicts with

    svn resolve path --accept theirs-full
    

    Or, you can tell the merge to do that:

    svn merge -rX:HEAD url/of/branch trunk\wc --accept theirs-full
    

    After such a merge, you have a working copy which looks like the one on the branch. All you have to do is commit that trunk's working copy.

提交回复
热议问题