I want to get the changes between commit A and B. Basically what changes have been committed since commit A. Should I use a triple dot when running git log or a double dot?
1 Answers
the logging with two dots like
git log start-branch..end-branch
You will see a log of a series of commits. The commits will be all the commits reachable from end-branch that are not reachable from start-branch, So logging without dots is the same as Logging with two dots.
logging with three dots like
git log start-branch...end-branch
This three dot version of the command finds all commits that are reachable from start-branch, OR that are reachable from end-branch BUT that are NOT reachable from both start-branch AND end-branch. you will see all commits reachable from start-branch AND all commits reachable from end-branch BUT excluding any commits reachable from any common ancestor.
By example, from the history above, let’s think about what would we get from:
git log topicB...topicA
From topicA we can reach this set of commits — G, F, E, D, C, B, A. From topicB we can reach J, I, H, D, C, B, A. That means that we can reach D, C, B, A from both of topicA AND topicB. So the returned commits would be G, F, E, J, I, H.

- 104
- 1
- 7
-
so your answer is _git log B .. A_ – IKEN Lemjahed Ayoub Nov 13 '15 at 00:59