How to understand git log --graph

前端 未结 3 683
面向向阳花
面向向阳花 2021-02-07 01:58

I am quite confused with the output of graphic git log.

I do understand that each * means a commit, whether it is a diverge, common or merge commit. I do un

3条回答
  •  面向向阳花
    2021-02-07 02:35

    First of all, which branch does the red pipe (the most left-handed one) represent for? I don't think it is the current branch that I am on, because after I checkout to other branch, the graph looks the same. Furthermore, it doesn't represent master branch neither.

    The red pipes show from where your last commit originated and any deviations from that origin. So when you use 'git log --graph --all', it might not be pointing to a commit on the current branch or master.

    Second of all, if the most left-handed branch represents a single branch, why it changes > color after commit "0e5b5"?

    See my answer above. The left-most line represents the branch which you have the last commit on. That line could have many different colors, as it changes color when there is a deviation. It just becomes red for the topmost section.

提交回复
热议问题