Step 1 & 2 are no longer enough, as git will nag about irreversable conversions regardless of you asking it to convert things.
See This issue for an explanation.
Tl;Dr: git config --global core.safecrlf false
Step 1:
Set autoclrf=true
git config --global core.autocrlf true
Step 2:
.gitattributes along with your .gitignore in first commit in any newly initialized repo
Write-Output "* text=auto" | Out-File .gitattributes
Fixing borked line endings:
If you already have checked out the code, the files are already indexed. After changing your git settings you should refresh the indexes with
git rm --cached -r .
and re-write git index with
git reset --hard
https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings