What exactly do we mean by “branch”?

前端 未结 2 807
-上瘾入骨i
-上瘾入骨i 2020-11-21 05:24

Long story short...

As far as I can tell, the term \"branch\" (in Git parlance) may refer to related but different things:

  1. a non-symbolic reference/p
2条回答
  •  广开言路
    2020-11-21 05:38

    In the second case, we mean "the commits that are reachable from the commit pointed to by the branch".

    In the Pro Git example, assuming the topic branch points to commit C7, that branch contains commits C7, C6, C5, C4, C3, C2, and C1. There is no other notion of a commit being "on" a branch than this in Git, and you are correct that you could redraw the DAG linearly.

    The Lynda.com diagram is terribly unclear, and I suspect you're right that it's misleading.

提交回复
热议问题