# different between two dots and three

In git the range notation behave differently between `log` and `diff`

```
     A---B---C topic
     /
D---E---F---G master
```

## Git log

### two dots (..)

`git log topic..master` : in *master* but not in *topic* (G, F)

`git log master..topic` : in *topic* but not *master* (C, B, A)

### three dots (...)

`git log topic...master` : in *master* and in *topic* but \*\*not both \*\* (G, F, C, B, A)

`git log master...topic` : the same (G, F, C, B, A)

## Git diff

### two dots (..)

`git diff topic..master` : what **is** and what **not** in *master* compared to *topic* (D, E, -A, -B, -C, +F, +G)

`git diff master..topic` : what **is** and what **not** in *topic* compared to *master* (D, E, -F, -G, +A, +B, +C)

### three dots (...)

`git diff topic...master` : in *master* but **not in \_topic**\_\*\* \*\* (D, E, +F, +G)

`git diff master...topic` : in *topic* but **not in \_master**\_\*\* \*\* (D, E, +A, +B, +C)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.yulrizka.com/git/different-between-two-dots-and-three.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
