

You'll still see the context, which (in my case, since I'm trying to ensure that there are no differences except whitespace differences) is not helpful. Instead of just using git diff -w, add -word-diff-regex=']': git diff -w -word-diff-regex=']' Next, you must control the definition of a word used. git config core.whitespace '-trailing-space,-indent-with-non-tab,-tab-in-indent' Perhaps there is a better answer, but the best solution I've found so far is this.įirst, you must control the definition of "whitespace" that Git is currently using. For instance, this question is about merging, not displaying differences, and this question deals with displaying word-level differences, and so forth. Everything else turned up by searching was a dead end as well. 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.

put curly braces on the end of the line of the key whose value they open, and.For instance, in the following output from git diff -w, -"Links": The problem is that this is not actually ignoring all whitespace differences-at least what I consider to be merely whitespace differences. Generates normal, context, and unified patches.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.Online manual and installed HTML help manual.

Language localization via plain-text PO files.Rudimentary Visual SourceSafe and Rational ClearCase integration.Shell integration (supports 64-bit Windows versions).Ability to ignore whitespace and letter case changes.Regular expression-based file filters in directory compare allow excluding and including items.Can also generate HTML report with differences highlighted.

