diff and patch disregard line endings Dos Unix
For Git repos, avoid the line-ending problem between Windows and Mac/Linux/BSD via .gitattributes file.
Otherwise, to disregard line endings for diff
and patch
:
diff -Naur --strip-trailing-cr old.txt new.txt