git replacing LF with CRLF

前端 未结 20 1446
眼角桃花
眼角桃花 2020-11-21 23:31

Running git on a Windows XP machine, using bash. I exported my project from SVN, and then cloned a bare repository.

I then pasted the export into the bare repositori

20条回答
  •  时光取名叫无心
    2020-11-22 00:13

    I think @Basiloungas's answer is close but out of date (at least on Mac).

    Open the ~/.gitconfig file and set safecrlf to false

    [core]
           autocrlf = input
           safecrlf = false
    

    That *will make it ignore the end of line char apparently (worked for me, anyway).

提交回复
热议问题