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

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.

主站蜘蛛池模板: 南乐县| 南开区| 博野县| 武强县| 磐安县| 新平| 南宫市| 田阳县| 津南区| 义乌市| 阿巴嘎旗| 巴中市| 延边| 新民市| 黑龙江省| 高清| 黄平县| 长子县| 习水县| 金阳县| 靖江市| 南安市| 天门市| 清水县| 喀喇沁旗| 芷江| 新邵县| 阿坝| 怀仁县| 大渡口区| 红安县| 汉川市| 高台县| 博白县| 浦北县| 惠安县| 蕲春县| 申扎县| 黑山县| 五峰| 松溪县|