I'm dealing with two Git branches, one of which has to be merged into the other periodically.
A long CSS file that is nearly identical on both branches has LF line endings on one branch and CR+LF on the other.
So, any changes to the file on one branch cause a merge conflict spanning the whole file, and I've essentially had to make the same changes manually on the other branch.
Of course, I could just convert the line endings on one of the branches and commit. But is there a better way to do it (e.g using a .gitattributes
file) to make git ignore the line endings and avoid any illegible (full-content-replaced) diffs?