定期从我的分支更新主干
我正在一个长期分支工作。我想每周左右用我分支中的东西更新主干。
我一直在使用合并一系列修订从主干更新我的分支。
然后我使用重新集成分支将我的分支合并回主干。
然后我回到我的分支并合并了一系列修订,我得到了大量的树冲突......
执行此操作的正确方法是什么? (保持主干从另一个分支更新,并保持该分支与主干更新)
I am working on a long term branch. I want to update the trunk with the stuff in my branch every week or so.
I had been updating my branch from trunk using merge a range of revisions.
I then used reintegrate a branch to merge my branch back into trunk.
Then I went back to my branch and did merge a range of revisions and I got a ton of tree conflicts....
What is the proper way to do this? (keep trunk updated from another branch and keep that branch updated with trunk)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该只让您的分支与主干保持最新。然后,当您准备将分支 mod 推回主干时,它只会从分支中获取更改。当你前进时,不要试图让它们保持同步,你只会陷入困境
You should only keep your branch upto date with trunk. Then when you are ready to push your branch mods back into trunk it will only take the changes from your branch. Don't try to keep them both in sync with each other as you go along, you'll just get tied up in knots
如果你开始破解一个没有人拥有的特定功能,并且你不与主干或任何其他树共享它,这可能是一个很好的过程:
如果您不将分支开发中的任何更改合并到主干,则可以更频繁地合并主干以和平地解决冲突或设计问题。 Subversion 会记住您之前合并的内容。
If you start to hack on a particular feature that no one has and you don't share it with trunk or any other tree this might be a good procedure:
If you don't merge changes in any time of branch development to trunk you can merge trunk more often to peacefully resolve conflict or design issues. Subversion remembers what you previously have merged.
这取决于您的组织如何使用分支机构。这就是我们所做的:
对于开发分支 - 我如何相信你在问题中使用分支 - 我同意皮特在这里的回答(并对他+1)。不要尝试在整个项目中合并这两种方式。在整个项目中,通过从主干到分支的合并来保持分支更新。项目完成后,将分支合并到主干(测试后!!!),然后完成分支。
对于发布分支,我们使用多种方式进行合并:
重要的是您的组织有政策并遵守它。不要临时做事。
HTH,
-aj
It depends on how your organization use branches. Here's what ours does:
For development branches - how I believe you're using branches in your question - I agree with Pete's answer here (and +1 to him). Don't try to merge both ways throughout your project. Throughout your project, keep the branch updated with merges from the trunk to the branch. Once your project is done, merge your branch down to the trunk (after testing!!!), and be done with the branch.
For release branches, we use merges a couple of ways:
What's important is that your organization have a policy and adhere to it. Don't do things ad-hoc.
HTH,
-aj