GIT: How to get rid of the annoying CRLF message on msysgit (windows)?

Practically everytime I stage a textfile (that’s most of em), I get the message from git gui (I use msysgit) that It replaced (or is about to) line endings with CRLF’s. Obviously I want that (and there’s a setting for it huraah), but I don’t want the annoying message popped up all the time!

Any way to keep the setting, but turn off/disable the popup message?

  • Can git be configured to not perform autocrlf on certain files?
  • Why is GIT not replacing CRLF with LF on writing to the working directory, although core.autocrlf is set to input?
  • Enforce core.autocrlf=input through .gitattributes
  • Git with autocrlf=true checks out files with mixed line endings as-is
  • Correct setting for git autocrlf as per use case
  • How to repair CRLF in GIT repository to avoid merge conflicts
  • I have no idea how this works with GIT on the commandline, but I like msysgit’s staging process 🙂 so I’d rather not change to bash.

  • Is it possible to git grep only through the modifications added by a particular commit?
  • Connecting git to github on windows 7 without bash
  • git (any SCM) and compiling object files, switching branches, physiology thereof
  • GIT - copy newest branch to another directory
  • How can I efficiently navigate a Git repo to follow project development?
  • How to limit file size on commit?
  • 5 Solutions collect form web for “GIT: How to get rid of the annoying CRLF message on msysgit (windows)?”

    The command line just prints a message, and that’s it.

    I don’t think that the message box can be disabled, unfortunately…

    One thing you could do, is setting the appropriate setting in the repo-config. The option core.autocrlf will do these things:

    1. All text-files will be stored with LF line-endings.
    2. When reading from disk, CRLF is converted to LF
    3. When writing to disk, LF is converted to CRLF

    You can set this option in git-shell

    $ cd path/to/repo
    $ git config core.autocrlf true

    And then, delete any file but the .git folder itself from the repo and run

    $ git reset --hard
    $ git commit -am "Line endings fixed."

    To fix he line endings.

    PS: There is a small chance, that binary files are accidentially threated as text files and may be corrupted, then you have to read the manual or just ask here.

    Maybe make sure: core.autocrlf=false.

    I don’t really know msysgit, but after a little searching, I found a couple of related msysgit / threads.
    Also see a related SO Q: What’s the best CRLF handling strategy with git?.

    Simple, use CRLF as line endings in your text editor, and git will have nothing to warn you about. (Execpt maybe once, if the pulled file doesn’t have CRLF line endings).

    Since you are using msysgit, I will assume core.autocrlf is set to tru (the default setting in msysgit installation)

    You could try setting core.safecrlf to false, and see if that has any influence on this kind of message.

    git config core.safecrlf false

    You can also try version a .gitattributes file and set a:

    *        eol=crlf

    directive to see if that explicit text attribute has any bearing on this warning message.

    Git Baby is a git and github fan, let's start git clone.