在 Mercurial 中,“头部”和“头部”之间有什么区别?和一个“分支”?
我是 Mercurial 和 DVCS 的新手。 头和分支有什么区别?
I'm new to Mercurial, and DVCS in general. What's the difference between a head and a branch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果你把它看作一棵树,那么头就是一片叶子,位于树枝的最末端。
Mercurial 自己的 wiki 对此进行了很好的解释:
分支机构
头
If you view it as a tree, then a head is a leaf, at the very end of a branch.
It's explained really well at Mercurial's own wiki:
Branches
Heads
答案是“这取决于”。 Mercurial 有四种不同的分支策略可供您选择,并且根据您选择的分支名称,答案可以是从“它们不相关”到“它们是同一件事”的任何内容。
首先看一下四种类型的分支 :
如果您不清楚其中任何一个,请点击链接。
然后,让我们看看每一个头和分支是如何相关的:
TL;DR:您需要了解头和分支才能很好地使用 DVCS。
The answer is "it depends". Mercurial has four different branching strategies from which you can pick, and depending how what you're choosing to call a branch the answer can be anything from "they're unrelated" to "they're the same thing".
First look at the four types of branching:
Hit the link if any of those are unclear to you.
Looking then at each of those let's see how a head and a branch are related:
TL;DR: You need to understand both heads and branches to use a DVCS well.
来自 wiki:
每个变更集都属于一个分支,如果未指定,
默认
。如果您是新手并且正在寻找快速入门,我建议您访问 hginit.com。
From the wiki:
Every changeset belongs to a branch,
default
if not specified.If you're new and looking for a quickstart, I recommend hginit.com.
很难指出差异,因为这些是正交的概念。它们在 Mercurial wiki 中进行了解释,其中有
It's hard to point out differences, because these are orthogonal concepts. They are explained in the Mercurial wiki, which has