I have a repository containing a single .md
file, which contains an essay I am writing.
I edit the file from a few different
Try just using
*.md text eol=native
instead of
*.md text
in your .gitattributes.
I did set up a small test repo with a CR-LF file in it and followed your first procedure to perform normalization:
git rm --cached -r .
git reset --hard
git add .
git commit -m "Normalize line endings"
That correctly normalized file on check-in. But, weirdly, it still maintained CR-LF when checking-out, even if I am on OSX.
Supposedly, default value for core.eol is native. So, I expected git to checkout my files using just LF. But it seems that for some reason, it's just not doing that. So, my understanding of .gitattributes is flawed, or we have a bug to be filed to git...
In any case, explicitly setting eol=native in .gitattributes did the trick for me, as I said.