I have files checked out with CRLF. I changed git config --global core.autocrlf false
. Git doesn't see any modifications. When I edit a file, Git thinks the whole file changed. How do I re-checkout and overwrite all the files with LF instead of CRLF, so the diff works as expected? I saw this but the answer referred to an invalid command. I saw this but it said "Git wants to commit files that you have not modified" which is not true. I tried
git pull --force
git checkout --force
However the files still have CRLF. So how do I convert all the files from CRLF to LF? I can edit each & every file in Notepad++ and use Edit > EOL Conversions > Unix (LF), which is what I've been doing on a file by file basis, but it's very tedious. There is probably an awk
or sed
script also, but I'm not familiar with them, and I'd prefer to only modify what is checked into Git, and not mess up .git/
.
Also tried
git reset --hard origin/master
And the files are still with CRLF!
This is not a duplicate of the suggested duplicate because I don't want to commit anything. Only want to fetch a fresh copy from Git. Also, Git doesn't see any files as being modified.