how to avoid git-apply changing line endings

后端 未结 3 1760
忘了有多久
忘了有多久 2021-02-08 03:56

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<

3条回答
  •  不知归路
    2021-02-08 04:48

    Try on a clean working directory:

    git apply mychanges.patch
    git diff -w > mychangesnows.patch
    git reset --hard
    git apply mychangesnows.patch
    

提交回复
热议问题