定期从我的分支更新主干

发布于 2024-08-20 02:33:34 字数 195 浏览 4 评论 0原文

我正在一个长期分支工作。我想每周左右用我分支中的东西更新主干。

我一直在使用合并一系列修订从主干更新我的分支。

然后我使用重新集成分支将我的分支合并回主干。

然后我回到我的分支并合并了一系列修订,我得到了大量的树冲突......

执行此操作的正确方法是什么? (保持主干从另一个分支更新,并保持该分支与主干更新)

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

软甜啾 2024-08-27 02:33:34

您应该只让您的分支与主干保持最新。然后,当您准备将分支 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

缘字诀 2024-08-27 02:33:34

如果你开始破解一个没有人拥有的特定功能,并且你不与主干或任何其他树共享它,这可能是一个很好的过程:

  1. 创建一个分支
  2. 提交到你的分支
  3. 破解,破解,破解并在准备合并时 使用主干,将主干更改合并到分支
  4. 解决冲突,提交分支
  5. 与主干干净地合并

如果您不将分支开发中的任何更改合并到主干,则可以更频繁地合并主干以和平地解决冲突或设计问题。 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:

  1. create a branch
  2. hack, hack, hack and commit to your branch
  3. when ready to merge with trunk, merge trunk changes to your branch
  4. resolve conflicts, commit to branch
  5. merge cleanly with trunk

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.

霓裳挽歌倾城醉 2024-08-27 02:33:34

这取决于您的组织如何使用分支机构。这就是我们所做的:

对于开发分支 - 我如何相信你在问题中使用分支 - 我同意皮特在这里的回答(并对他+1)。不要尝试在整个项目中合并这两种方式。在整个项目中,通过从主干到分支的合并来保持分支更新。项目完成后,将分支合并到主干(测试后!!!),然后完成分支。

对于发布分支,我们使用多种方式进行合并:

  • Trunk ->分支:初始集成 - 创建发布分支。一般来说,这是我们唯一一次在这个方向上与发布分支合并。
  • 分公司-> trunk:如果在生产中发现错误,我们会修复分支,然后合并回主干。这种情况会一直发生,直到下一个发布分支被切断

重要的是您的组织有政策并遵守它。不要临时做事。

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:

  • Trunk -> branch: Initial integration - create the release branch. And generally, this is the only time we merge in this direction with release branches.
  • Branch -> trunk: If bugs are found in production, we fix on the branch and then merge back to the trunk. This happens until the next release branch is cut.

What's important is that your organization have a policy and adhere to it. Don't do things ad-hoc.

HTH,

-aj

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文