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

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.

主站蜘蛛池模板: 仁寿县| 永安市| 蓝山县| 东兰县| 卫辉市| 永嘉县| 遂宁市| 三江| 屏南县| 拉萨市| 连平县| 新沂市| 新龙县| 洛宁县| 泰来县| 邹城市| 广东省| 大姚县| 和硕县| 巴林左旗| 石城县| 长岛县| 桃园县| 绿春县| 贞丰县| 阿克苏市| 安泽县| 太谷县| 博客| 舟曲县| 兴义市| 齐齐哈尔市| 沂水县| 拜泉县| 陕西省| 绥棱县| 舟曲县| 石柱| 合江县| 沂水县| 乌兰县|