关闭分行的目的是什么
我想知道关闭分支的目的是什么。至于 issue-1
分支,我已经关闭了。但
- 我仍然可以在修订图中看到
issue1-1
- 我仍然可以切换到分支
issue1-1
,并继续提交。
那么,关闭分支机构的全部意义是什么?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
参阅: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. Andhg 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.
这正是为什么命名分支可能不是每个功能和每个问题分支的正确选择——您可以隐藏它们,但无法消除它们。考虑为“稳定”、“实验”等长期概念保留命名分支。对于每个问题和每个功能分支,匿名分支、克隆分支或书签都是更好的解决方案。这里对它们都有精彩的描述:
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.