いわゆるダブルドットとトリプルドット。
履歴が1本
図解
コマンド
git log
$ git log master..test
C
$ git log master...test
C
$ git log test..master
$ git log test...master
C
git diff
$ git diff master..test
+C
B
A
$ git diff master...test
+C
B
A
$ git diff test..master
-C
B
A
$ git difftest...master
履歴が分岐
図解
コマンド
git log
$ git log master..test --> git log ^master test
C
$ git log master...test --> git log master test ^B
D
C
$ git log test..master --> git log ^test master
D
$ git log test...master --> git log test master ^B
D
C
git diff
$ git diff master..test --> git diff master test
-D
+C
B
A
$ git diff master...test --> git diff B test
+C
B
A
$ git diff test..master --> git diff test master
-C
+D
B
A
$ git diff test...master --> git diff B master
+D
B
A
まとめ
-
git log
は範囲を指定 -
git diff
は2点を指定