What are the differences between double-dot “..” and triple-dot “…” in Git diff commit ranges?

前端 未结 5 588
广开言路
广开言路 2020-11-22 12:33

What are the differences between the following commands?:

git diff foo master   # a 
git diff foo..master  # b
git d         


        
5条回答
  •  时光说笑
    2020-11-22 13:07

    The top picture is equivalent to the bottom graph tree

    A0 <- A1 <- A2 <- A3 (master)
       \
        C0 <- C1 (test)
    

    A picture is worth a thousand words, the difference between .. ... ^ is shown below.

    $ git log master..test
    # output C0 C1
    
    $ git log ^master test
    # output C0 C1
    
    $ git log master…test
    # output A1 A2 A3 C0 C1
    

提交回复
热议问题