Search code examples
gitgit-configeol

is it possible to not make any newline conversions with git


I'm not sure how much detail is needed about our setup / workflow but the bottom line is I am trying to find a config that does no newline conversion what-so-ever, not on check-in, not on check-out.

Some of the applications files use windows newlines, some use unix, all of them must be preserved as is. it seems pretty easy to either be one or the other but not both or agnostic. Is this possible with git?


Solution

  • git config --global core.autocrlf false
    

    Should be enough. If you still get conversions, there is something else wrong, like editor messing with your newlines or .gitattributes file present.