This problem can be caused by gitattributes' text option https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
This problem can be fixed by temporarily editing your .gitattributes
file within your project folder.
change * text=auto
to #* text=auto
make the necessary changes to files line endings and push your commit. You can then enable it again after the change has been made, or alternatively select one of the other options that may better suit your project.