How should I Fix "svn: Inconsistent line ending style"?

In my case, svn:eol-style property was set on a file. And "some lines of the file were separated by UNIX line endings (LF character), while others were separated by DOS-style line endings (CR+LF characters)". Here is another detailed discussion of this problem.
"Edit"->"EOL Conversion"->"Windows format" in Notepad++ solved the issue for me.


Subversion is not complaining about the content of any file, but about the content of the svn:ignore property. One way to fix this is to simply delete the svn:ignore property with svn propdel and then recreate it.

Another way which may be easier if you have a lot of lines in your svn:ignore:

  1. fetch the value of svn:ignore in a temporary file like this:

    svn propget svn:ignore . > temp

  2. fix the line endings in the temp file
  3. set the value of svn:ignore from the fixed file like this:

    svn propset svn:ignore -F temp .


In my case I was editing in Windows. To fix:

  1. Open file in Notepad++
  2. Convert line ending to Unix (Edit menu -> EOL Conversion -> Unix)
  3. Save
  4. Convert line endings to Windows (Edit menu -> EOL Conversion -> Windows)
  5. Save

This did it.


Running

unix2dos [file]

via cygwin fixed this for me.