关闭分行的目的是什么

发布于 2024-10-08 13:04:01 字数 256 浏览 0 评论 0原文

alt text

我想知道关闭分支的目的是什么。至于 issue-1 分支,我已经关闭了。但

  • 我仍然可以在修订图中看到 issue1-1
  • 我仍然可以切换到分支 issue1-1,并继续提交。

那么,关闭分支机构的全部意义是什么?

alt text

I was wondering, what is the purpose of closing a branch. As for issue-1 branch, I had already close. But

  • I still can see issue1-1 in my revision graph
  • I still can switch to branch issue1-1, and continue to commit.

So, what is the whole point of closing a branch?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

征棹 2024-10-15 13:04:01

参阅:https://www.mercurial-scm.org/wiki/PruningDeadBranches

请 是信息性的,因此 hg Branches 将显示这些分支已关闭。并且 hg Heads --active 不会显示任何标记为关闭的头。

从长远来看,分支数量可能相当大,并且会增加信息噪声。这是消除一些噪音的好方法。

See: https://www.mercurial-scm.org/wiki/PruningDeadBranches

It is informational so that hg branches will show that these branches are closed. And hg heads --active will not display any heads that are marked closed.

In a long run, number of branches can be considerable and can add to informational noise. This is a good way to prune some of those noise.

╰◇生如夏花灿烂 2024-10-15 13:04:01

这正是为什么命名分支可能不是每个功能和每个问题分支的正确选择——您可以隐藏它们,但无法消除它们。考虑为“稳定”、“实验”等长期概念保留命名分支。对于每个问题和每个功能分支,匿名分支、克隆分支或书签都是更好的解决方案。这里对它们都有精彩的描述:
Mercurial 分支指南

This is exactly why named branches probably aren't the right choice for per-feature and per-issue branches -- you can hide them but you can't eliminate them. Consider reserving named branches for long-lived concepts like 'stable', 'experimental', etc. For per-issue and per-feature branching either anonymous branches, clone branches, or bookmarks are better solutions. They're all described wonderfully here:
A Guide to Branching In Mercurial.

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