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

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.

主站蜘蛛池模板: 同仁县| 麻城市| 新乡县| 墨玉县| 寿阳县| 沙坪坝区| 六安市| 黔西县| 浪卡子县| 安宁市| 上栗县| 剑河县| 成武县| 松阳县| 玉溪市| 吕梁市| 聂拉木县| 吴忠市| 贡觉县| 且末县| 永顺县| 临洮县| 新干县| 昭通市| 新和县| 平安县| 上栗县| 娄烦县| 崇州市| 万盛区| 清河县| 福清市| 洛川县| 廊坊市| 佛教| 镇平县| 察雅县| 东源县| 林州市| 平乡县| 汶上县|