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

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.

主站蜘蛛池模板: 新干县| 建宁县| 神池县| 泗水县| 浮梁县| 铁岭县| 克东县| 绩溪县| 新乐市| 临潭县| 榕江县| 太仆寺旗| 德昌县| 哈尔滨市| 宜川县| 东乌| 衡山县| 汨罗市| 荣昌县| 常宁市| 曲水县| 区。| 深泽县| 上饶市| 苗栗县| 金华市| 年辖:市辖区| 犍为县| 德昌县| 长沙市| 隆昌县| 遂宁市| 大渡口区| 疏勒县| 九江县| 晋江市| 漳浦县| 噶尔县| 成都市| 镇雄县| 岳普湖县|