官术网_书友最值得收藏!

Branches are movable labels

We have seen in the previous sections how the commits are linked to each other by a parent-and-son relationship: each commit contains a reference to the previous commit.

This means that, for example, to navigate within a repository I cannot start from the first commit and try to go to the next, because a commit has no reference to who comes next, but to who comes first. By staying in our arboreal metaphor, this means that our tree is only navigable from leaves, from the extreme top of a branch, and then down to root-commit.

So, branches are nothing but labels that are on the tip commit, the last one. This commit, our leaf, must always be identified by a label so that its ancestors commits can be reached while browsing within a repository. Otherwise, we should remember for every branch of our repository the hash code of the tip commit, and you can imagine how easy it would be for humans.

主站蜘蛛池模板: 云安县| 富民县| 民丰县| 通江县| 大港区| 汶上县| 虞城县| 独山县| 通化县| 梁平县| 广西| 吉林市| 泾源县| 册亨县| 四川省| 托克托县| 神农架林区| 新源县| 始兴县| 尉犁县| 邳州市| 云阳县| 潼南县| 涿州市| 宜阳县| 西平县| 昂仁县| 延川县| 高陵县| 阿瓦提县| 漳州市| 永宁县| 蒙自县| 扶风县| 历史| 西平县| 长武县| 贺兰县| 固安县| 甘孜县| 克拉玛依市|