Pain in the dots¶
git uses a two and three dot notation for
git log and
Unfortunately they mean different, and nearly opposite things, in the two cases.
See git log and git diff for an alterative explanation.
The dot difference¶
This is a summary. You need the pages above to get the full picture.
Imagine this history:
A---B---C topic / D---E---F---G master
A, B, C is the stuff unique to
F, G is the
stuff unique to
log and two dots gives you the stuff unique to the second named branch.
git log master..topic
will show you a log of commits
C, B, A.
log and three dots shows you the stuff unique to the second named branch AND
the stuff unique to the first named branch, so:
git log master...topic
C, B, A and
diff on the other hand, means something different. So
diff and two
git diff master..topic
shows you all stuff that differs between the state as of
master and the
state as of
topic. It will show you the difference between the effect of
A, B, C and the effect of
F, G. You can think of this as being the
difference between the stuff unique to
topic and the stuff unique to
diff and three dots:
git diff master...topic
shows you the stuff that differs between
topic and the last common ancestor
master). In this example that ancestor is commit
three dots for diff is the difference caused by the stuff unique to