Search code examples
gitcomposer-phpcore.autocrlf

How to prevent Composer from using global core.autocrlf config on Windows


I have a private git repo configured in my composer.json file.

I am trying to require a package from it, however I want composer to checkout the repository with lf line endings.

I want to keep my global core.autocrlf set to true.

Is there any way to tell composer to run the git clone command with autocrlf set to false?


Solution

  • I found if I add

    * text eol=lf
    

    to .gitattributes it checks out correctly