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

Wrapping up

It's time to summarize all the concepts illustrated since now.

An image, as they say, is worth a thousand words, so here you can find a picture representing the actual state of our repository, thanks to the git-draw tool (https://github.com/sensorflo/git-draw):

In this graphic representation, you will find a detailed diagram that represents the current structure of the newly created repository; you can see trees (yellow), blobs (white), commits (green), and all relationships between them, represented by oriented arrows.

Note how the direction of the arrow joining the commit comes from the second commit and goes to the first, or from descendant to its ancestor; it may seem a detail, but it is important that graphic representations such as these are properly indicated in order to correctly highlight the relationship that binds the commits between them (it is always the child who depends on the parent).

I just want to highlight some other things; such as:

  • The two different trees refer to the same README.md blob
  • There are two different blobs for the shoppingList.txt files, one containing only the banana text line and one containing banana and apple
  • The second commit refers to the first
  • The first commit has no parent
  • There are three commits!

What the heck?!

Okay, don't panic. Look at the commit at the right of the picture, and read author and email: that was the first commit we did using the wrong user and email; after that, we amended the commit, changing the author, remember?

Well, but why is it already there? And why do we see it in this picture, but we don't see it in git log?

It's about reachability of the commit, a topic that we will talk about in the following sections.

 

主站蜘蛛池模板: 浮山县| 马公市| 霍城县| 瑞丽市| 正镶白旗| 南岸区| 扎赉特旗| 滕州市| 咸丰县| 金堂县| 清水河县| 民丰县| 舒兰市| 黄冈市| 信宜市| 北海市| 万安县| 大安市| 新乐市| 东乡| 西吉县| 盐亭县| 临高县| 新蔡县| 宁海县| 天气| 沽源县| 武威市| 铜鼓县| 和政县| 通化市| 丰顺县| 阿拉尔市| 东明县| 略阳县| 齐齐哈尔市| 扎鲁特旗| 茌平县| 墨竹工卡县| 化德县| 利川市|