Git 有向无环图 - 孩子知道他们的父母,但反之则不然
Git 被实现为有向无环图。孩子们了解他们的父母,但反之则不然。这是有道理的,因为我只能通过分支或标签(一般来说通过引用)到达每个提交。这就是我遍历树的方式。 Git 的开发者还有什么其他原因让“孩子认识他们的父母,而不是相反”?/这样做的主要好处是什么?
Git is implemented as a directed acyclic graph. Children know their parents but not the other way round. This makes sense because i can reach every commit only through a branch or a tag ( generally speaking through a reference). That's how i traverse the tree. What other reasons had the developers of Git to make "the children know their parents but not the other way around"?/ What are the key benefits of this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
主要好处是修订一旦提交就不会再更改。如果您更新它以包含子项,则必须重写它。这会扰乱用于身份和完整性的哈希码。
The main benefit is that a revision once committed has never to be changed again. If you update it to include children, you have to rewrite it. That messes up the hash codes used for identity and integrity.