Gitでインデントを無視して比較する方法です。
-w または --ignore-all-space オプションを使います。
-w
--ignore-all-space
diffの場合
git diff -w
logの場合
git log -w -p