views:

112

answers:

2

In my git log, I have 2 commits. How can I generate the difference - ignoring spaces - between them?

$ git log
commit e5640171f391fdf479fa14fab0da6628efed1fa6
Author: test <[email protected]>
Date:   Mon Jul 13 11:41:02 2009 -0700

    Fix Bug 1.

commit 0984e27b75f480da8b8c4ce2399bf877c557a78d
Author: test <[email protected]>
Date:   Tue Jul 7 14:50:26 2009 -0700

    Fix Bug 2.
+2  A: 

Simply:

git diff -w 0984e27 e56401
Jim Puls
Thank you. But where do you get the number "0984e27 ", "e56401" from?
n179911
They're the hashes for your two commits, as in your question. You can use any unambiguous prefix for commit hashes instead of the whole thing.
Jim Puls
+6  A: 
git diff --ignore-all-space 0984 e564

-w is shorthand for --ignore-all-space

More important is knowing how I found out:

git help diff

This allowed me to see the various options with explanations.

kajaco
Why read documentation? Just waste other people’s time! \o/
Bombe