we have some files originally created under Windows with EOL (CRLF) and others with Linux (LF), sometimes the IDE (or a bad configured Git after a fresh reinstall) changed those EOL overriding and making us lose the entire history of the files (blame
is completely useless, just with -w works).
I tried tracking the last time the file was ok, before the switch of EoL and replacing it but didn't work, retrieving that file from another branch. Since the file always had minimal changes I didn't notice this problem after several commits and merges, I have a 6 months old branch with the original EOL.
How can I fix these files?
You need to run blame with -w:
There are other options to control this, and -w means "do not consider spaces/tabs/new line changes".
Just in case, you should not have these EOL changes in the first place. They are a pain to deal with long term.
Self-promotion warning: this "article" (for lack of a better word) talks about EOL changes when merging. It also points to a recipe to fix EOL problems... but with a few considerations to use the script.... you might develop something from that (no tracking, no monetization). http://www.ezconflict.com/en/conflictsse16.html#x80-1200003.2