ceremcem
ceremcem

Reputation: 4350

How to tell git --ignore-space-at-eol globally, everytime, once for all?

I'm tired of changing core.autocrlf to true, input and false from time to time in order to make git diff ignore CRLF and LF differences. At this time git diff does not even display an ^M character at the diff output, but still behaves like the files are fully different while they are fully same.

I came across git diff --ignore-space-at-eol switch, which fixes my issue. I am, however, not able to configure this behavior globally.

How can I tell git diff to use --ignore-space-at-eol switch by default?

Upvotes: 1

Views: 343

Answers (1)

torek
torek

Reputation: 488193

How can I tell git diff to use --ignore-space-at-eol switch by default?

You can't.

You can, however, set up an alias or, or write your own command, that invokes git diff and adds the flag. That's probably the way to go here. See, e.g., How do I alias commands in git?

Upvotes: 1

Related Questions