[英]How to reintegrate branch, overwriting trunk changes that has not been merged into branch?
We have worked on a feature branch the last six months. 在过去的六个月中,我们一直在功能分支上工作。 Most commits made to the trunk in this period have been merget to the branch, but some trunk commits were deliberately never merged to the branch.
在此期间,对主干所做的大多数提交都已合并到分支中,但是有意将某些主干提交从未合并到分支中。
Now the branch is complete, and we basically want to "replace" trunk with the branch (we do not need the trunk changes that was never merged to the branch anymore). 现在分支已经完成,我们基本上想用分支“替换”主干(我们不再需要不再合并到分支的主干更改)。 This answer to a simular question suggests :
对于一个类似问题的答案表明 :
This answer suggests : 这个答案表明 :
svn co http://svnhost/trunk
cd trunk
svn merge http://svnhost/trunk http://svnhost/branches/branchname
What will be the proper solution in my case? 在我的情况下,什么是正确的解决方案?
If you really want to replace your trunk, then you could you use the Repository Browser (TortoiseSVN) and do the following: 如果您确实要更换中继线,则可以使用存储库浏览器(TortoiseSVN)并执行以下操作:
You could also move the branch to the repository root and rename it to "trunk". 您也可以将分支移动到存储库根目录并将其重命名为“ trunk”。
If you are using externals that point to your current trunk, you might have a problem if you did not use the "peg" revision when referencing the trunk. 如果使用指向当前中继线的外部设备,则在引用中继线时未使用“ peg”修订版,则可能会出现问题。 If you do not use externals, you should be fine.
如果您不使用外部设备,则应该没问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.