I have cloned a repository that had inconsistend line endings. I have added a .gitattributes that sets the text attribute for the files I want to normalize. Now
The * text=auto option in .gitattributes leaves the Git repository in an 'illegal state' if it contains files with CRLF (Windows) line endings which are now marked as text (see https://marc.info/?l=git&m=154484903528621&w=2). The standard renormalize option does not work correctly with the LFS filters, so the instructions in the other answers or for example at https://help.github.com/en/articles/dealing-with-line-endings, do not work correctly. Instead these steps worked for us:
Situation:
Also changed the -crlf to -text for LFS tracked files, not sure that is needed.