I'm going through a codebase and fixing whitespace oddities and generally correcting indentation and such things, and I want to make sure I haven't inadvertently made any other changes, so I'm doing git diff -w
to display differences in all changed files while ignoring whitespace differences. The problem is that this is not actually ignoring all whitespace differences—at least what I consider to be merely whitespace differences. For instance, in the following output from git diff -w
,
-"Links":
-{
-
- "Thermal":
-
-{
-
+ "Links": {
+ "Thermal": {
you can see that I've only
- removed superfluous blank lines,
- put curly braces on the end of the line of the key whose value they open, and
- indented to fit the context
This question looked like it might offer an answer at first, but it deals with differences between two specific files, not between two specific commits. Everything else turned up by searching was a dead end as well. For instance, this question is about merging, not displaying differences, and this question deals with displaying word-level differences, and so forth.
git difftool
+ kdiff3 is one option – Ryccadiff
. – Grinder