diff and patch disregarding line endings Dos Unix

less than 1 minute read

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

Categories:

Updated:

Leave a Comment