I decided to set my line endings the Right Way via a .gitattributes
file as detailed for instance here - so I set the core.autocrlf to false and created and committed a .gitattributes file :
*.java text eol=native
*.jsp text eol=native
*.css text eol=native
*.html text eol=native
*.js text eol=native
*.xml text eol=native
*.sql text eol=native
*.MF text eol=native
# git files
*.gitignore text eol=native
*.gitattributes text eol=native
#eclipse files
*.classpath text eol=native
*.project text eol=native
*.prefs text eol=native
*.properties text eol=native
I then issued git rm --cached -r .
and then git reset --hard
(tried also git checkout HEAD
), as suggested here. Now all the files have LF line endings. Shouldn't be CRLF ? What do I miss ? I am on windows 7, git version 1.8.0.msysgit.0
.
Thanks
It must be a bug. It is strange it is not fixed or reported really - this whole mess is about windows, and it does not work precisely on windows ? Moreover there is no mention of it anyplace (?)
EDIT : Installed from the mingw "latest repository catalogues" - g++, gcc, ObjC + the MinGW Developer Toolkit and MSYS-1.0.11. Same behavior. Whenever I try to commit a CRLF file I get the CRLF will be replaced with LF (on checkout is implied) warning.
EDIT 2 : seems about to be fixed
EDIT 3: This has been fixed in Git 1.8.4.