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

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.

主站蜘蛛池模板: 岗巴县| 五河县| 砚山县| 永福县| 板桥市| 商河县| 富平县| 乌兰县| 滦平县| 庆云县| 虞城县| 咸丰县| 平江县| 两当县| 湘潭县| 黑河市| 贵德县| 青川县| 库伦旗| 吴江市| 托里县| 新化县| 阿鲁科尔沁旗| 铜山县| 梁河县| 潢川县| 江华| 苍南县| 泸西县| 正阳县| 惠水县| 汾阳市| 伊川县| 海南省| 且末县| 济南市| 枣阳市| 澄江县| 汾西县| 繁昌县| 当雄县|