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

后端 未结 4 2113
轮回少年
轮回少年 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 11:03

    To check what line endings were actually committed in the repository (regardless of your core.autocrlf setting), try the following:

    git grep -I --files-with-matches --perl-regexp '\r' HEAD
    

    (-I means that binary files should not be looked at.)

提交回复
热议问题