+1 vote
1 view
in Devops and Agile by (16.9k points)
edited by

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 Answer

0 votes
by (22.3k points)

You can use this for end of line:

$ git diff --ignore-space-at-eol

Instead of what are you using currently:

$ git diff -w (--ignore-all-space)

But if you want a built in solution for start of line then my friends you are out of luck. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !