Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 12
    you may have wanted to git diff -b - I showed this in stackoverflow.com/a/46265081/58794 Commented Sep 17, 2017 at 14:21
  • 12
    With Git 2.16 (Q1 2018), you will have git diff --ignore-cr-at-eol. See my answer below.
    – VonC
    Commented Nov 29, 2017 at 21:37
  • 21
    @JasonPyeron and for future Googlers: I had to look up that git diff -b is identical to git diff --ignore-space-change.
    – Gogowitsch
    Commented Dec 30, 2018 at 22:19
  • Related: on Linux you can use the command-line utility dos2unix (and unix2dos) to convert between line-endings. Commented Jun 10, 2022 at 13:45
  • git config core.whitespace cr-at-eol alesub answer below should be the accepted answer. None of these other fixes work on latest MacOS. Other fixes do seem to work on older Mac OSes. Commented Jun 30, 2023 at 20:54