Consider the following situation: A git repository exists, containing text files with both CRLF and LF line endings.
I'd like to
- Enforce all future commits to be converted to LF
- Enforce all future clones to be checked out in LF
Convert my local index to only use LFsee comments- Convert my local working directory to only use LF
I can do 1. easily with * text=auto eof=lf
in .gitattributes
.
But is there any way to do 2. and 4. without a mass-change commit, and without affecting existing history?
I suppose converting the local index is not possible, but if 1. and 4. works, it shouldn't be required.
I've read and tried almost every combination of core.autocrlf
, .gitattributes
options, and git checkout/rm/checkout-index/reset
permutation without success.