Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
1 view
in DevOps and Agile by (19.4k 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 (27.5k 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. 

Related questions

0 votes
1 answer
asked Jul 22, 2019 in DevOps and Agile by humble gumble (19.4k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...