What does the `..` mean in git branch reference?

前端 未结 4 987
闹比i
闹比i 2020-11-29 05:10
git log origin/master
git log origin/master..

What is the exact difference with the above? I\'m trying to understand what exactly the ..

4条回答
  •  死守一世寂寞
    2020-11-29 05:43

    My own mnemonic way to remember the semantics...

    I think of 'git log start..end' in terms of date range where start represents the older part of history, and end for the more recent history. However, unlike date range, commit range is not a linear walkback and has no relation to actual timing, but rather a set subtraction, i.e.:

    (commits reachable from "end") - (commits reachable from "start")
    

    Remember that the start (to be excluded) in a commit range represents a set of one or more commits, not one single commit.

    Effectively, it refers to all commits created between 'start' (exclusive) and 'end' (inclusive).

提交回复
热议问题