I wrote a previous post on cleaning up end of line whitespace using git... But I've now run into a similar issue, the IDE used by several of the devlopers on my project
likes to change surrounding whitespace indentation of lines. This means if you change just one line, the indentation changes will swamp the real changes, making the diff unhappy to look at.
You can view a diff without showing whitespace changes in git using
--ignore--all-space. However unforunately the command
git rebase -f master --ignore-space-change
doesn't do what one might hope.
However all is not lost. You can get the same kind of behaviour by plumbing together
git format-patch and
git branch fixed 40caad7 git checkout fixed git format-patch --stdout --ignore-all-space fixed..original | git am --ignore-whitespace
This takes the the changes from
original and applies them to the new
fixed branch, but removes/fixes whitespace changes.