Search code examples
gitconfigurationgit-submodulescore.autocrlf

how to set git core.autocrlf for a submodule


Is it possible to configure core.autocrlf=false for a specific submodule? I do not have push access for the submodule, so I need to set it from outside.


Solution

  • Do not put --global should be enough

    git config core.autocrlf  false
    

    But if the question is how do do it and share it in your repo to be available for git clone, you can't. But you can use some tricks. Thare tones of answer on SO on how to do it here for why you can't and there on how you can go closer about what you want. hope that will help.