Is there a way to determine the line endings in a existing git repo?

后端 未结 4 2112
轮回少年
轮回少年 2020-12-16 10:17

Is there a way to determine the line endings in a existing git repository?

If I clone a existing repository how do I determine what core.autocrlf was used by the cre

4条回答
  •  臣服心动
    2020-12-16 10:47

    In Windows, just run the below command from the command prompt:

    git config --list
    

    This will list all the git configuration variables.

    If you want to get the individual config setting (e.g. for core.autocrlf), run the following command on the windows command prompt:

    git config --get core.autocrlf
    

    This will either give you a "true" OR "false" value.

    IF you wish to change this, edit C:\ProgramData\Git\config file, and change the value from false to true

    Note: This only applies for Windows operating systems.

提交回复
热议问题