颠覆合并、树合并
我需要将分支中的更改合并回主干,但希望继续在现有分支上工作。
我本来打算使用重新集成合并,但意识到这不合适,因为我需要重新创建我的分支等,由于多种原因这是不可取的。
我真正想做的是将分支中的当前修订合并到 head,然后让人们继续处理当前的工作副本。
所以我的问题是,树合并可以用来解决这个问题还是我必须重新集成和重新创建。
I need to merge changes from a branch back into trunk but want to continue work on the existing branch.
I was going to use a re-integrate merge but realised this is not suitable as I will need to recreate my branch etc which for a variety of reasons is not desirable.
What I really want to do is merge the current revisions in the branch down to head and then keep people working on their current working copies.
So my question is , can tree merge be used to solve this or do I have to reintegrate and recreate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将分支合并到主干并继续在分支中工作,而无需重新创建分支 - 这不是问题。
为了您自己的方便,您应该在提交消息中(在提交到主干期间)包含合并操作的修订范围。这样,将来就可以很容易地从这次合并结束的地方开始执行另一个合并操作。
You can merge the branch to the trunk and keep on working in the branch, without recreating the branch - that's not an issue.
For your own convenience, you should include the revision range of the merge operation in the commit message (during commit to trunk). That way it will be easy to perform another merge operation in the future, starting from where you ended with this merge.
正如 Vicky 提到的,从分支合并到主干不会影响分支,人们可以继续在该分支中工作。但有一个警告:在 1.5 版本之前的 Subversion 中,从一个分支重复合并到主干过去很尴尬——手动记下已经合并的修订,并确保不再包含这些修订。
从版本 1.5 开始,Subversion 就有了基本的“合并跟踪”功能。有关更多信息,请参阅 SVN 书籍:高级合并高级合并主题。
As mentioned by Vicky, merging from a branch to trunk doesn't affect the branch, and people can continue to working in that branch. There's one caveat though: repeatedly merging from one branch to trunk used to be awkward in Subversion prior to version 1.5 -- manually noting down the revisions already merged, and making sure not to include those again.
Since version 1.5 Subversion has basic 'merge tracking' functionality. See SVN book: Advanced Merging for documentation on more advanced merge topics.
将分支的更改合并到主干根本不会影响分支。因此您之后可以毫无问题地继续使用它。
不过,您将需要主干的工作副本来执行合并。
Merging changes from the branch to the trunk does not affect the branch at all. So you can carry on working in it afterwards with no problem.
You will need a working copy of the trunk, though, to perform the merge in.