I have a git repo set with core.eol=crlf
, core.autocrlf=true
and core.safecrlf=true
.
When I apply a patch from another crlf
repo and to my repo all the line endings for the effected file are changed to lf
. Currently I'm applying the patch as so:
git apply --ignore-whitespace mychanges.patch
(It seems I have to use --ignore-whitespace
to get the patch to successfully apply.)
My current work around is to run unix2dos
on the file. Is there a better way of getting apply to conform to my eol settings?
lf
, but I'm using my git repo to work with my organisation's svn in which the line endings are required to bycrlf
. When Igit svn dcommit
, I don't want to pushlf
eols to the database. I'm not finding any problems anywhere else working withcrlf
(I'm on Windows),git diff
andvim
won't show^M
unless there's an inconsistency. – Urbani