# Diff'ing

Good idea to compare diffs before merging

## Diff'ing contents from one revision to another

First, we'll need the revisions numbers (otherwise call 'commit hashes'):

```bash
]$ git log
```

```
... make note of the different commit hashes ...
```

Now, let's see what changed from one commit to the other:

```bash
]$ git diff -r [hash-here] [other-hash-here]
```

## Diff'ing Branches

Best git practices promotes the use of branches, so it natually leads to the need to diff them.

General syntax:

```bash
]$ diff [branch] [branch]
```

For example, lets diff the 'master' branch to the 'test' branch:

```bash
]$ diff master test
```

If the diff's look sane, it's save to merge.
