What is the best git config set up when you are using Linux and Windows?

后端 未结 1 1171
北荒
北荒 2021-01-05 08:23

I am a bit confused with core.eol, core.autocrlf, core.safecrlf for git config.

http://git-scm.com/docs/git-config

I am using Ubuntu and Widows.

I ha

相关标签:
1条回答
  • 2021-01-05 09:03

    As detailled in Git on Windows (msysgit) - Unix or DOS line termination, I would use:

    git config --system core.autocrlf false
    

    That would avoid any automatic eol transformation (See "Git on Windows: What do the crlf settings mean?" for the exact meaning of this option value).

    You can leave it to true, as explained in git replacing LF with CRLF, but I prefer setting core.eol + some gitattribute files in order to fine tune some of the files I want eol changes on.
    See this answer for more details.

    0 讨论(0)
提交回复
热议问题