Git diff -w ignore whitespace only at start & end of lines
问题 I love to use git diff -w to ignore whitespace differences. But, I just noticed that it ignores even whitespace differences in the middle of lines. How could I only ignore whitespace differences that come at the start (^) or end ($) of lines? 回答1: For end of line use: git diff --ignore-space-at-eol Instead of what are you using currently: git diff -w (--ignore-all-space) For start of line... you are out of luck if you want a built in solution. However, if you don't mind getting your hands