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'):

]$ git log
... make note of the different commit hashes ...

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

]$ 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:

]$ diff [branch] [branch]

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

]$ diff master test

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

Last updated