0

Is this normal, and should I commit this?

I am aware that Git has settings to conver line-endings to \n before storing them, but reconfigured my editor to use *nix style by default (don't know how it changed to Windows style), and so I converted everything I had in my working directory, just to "get caught up".

Is there any reason to fear?

Not that it matters, but the files are CSS, HTML, PHP, JS, etc.

anonymous coward
  • 12,594
  • 13
  • 55
  • 97
  • 1
    See also this SO question & answers: http://stackoverflow.com/questions/861995/is-it-possible-for-git-merge-to-ignore-line-ending-differences – dthorpe Mar 18 '11 at 21:01
  • Ah, yes, the conflicts. Not a large project, and not very complicated, but I can see how that would make it really very messy. – anonymous coward Mar 18 '11 at 21:15

1 Answers1

3

Git is right. Git's diff's are based on whether a line has changed or not, and literally every single line in your file has changed. That's what happens when you convert line endings.

There's no reason for you to be worried about this, but you might consider the first option you mentioned - telling git to convert the files as they're committed, while leaving the copy in your working directory alone.

user229044
  • 232,980
  • 40
  • 330
  • 338
  • As I thought. I think the biggest issue would be potential conflicts, if I had done this on a larger project with several people working on the code-base. – anonymous coward Mar 18 '11 at 21:16