Search code examples
gitgitattributes

How to find out whether a file has been commited with CRLF?


The git documentation states:

When the file has been committed with CRLF, no conversion is done.

How do I (does git) find out whether a file has been commited with CRLF?


Solution

  • git ls-files --eol <path/to/file>
    

    will output that info. (doc)

    Hint :
    i/ means "index" and
    w/ means "working tree"