4

I did git checkout master. If I do git status it shows two changed files in my working directory, even though I haven't touched them. It appears to be some sort of line ending issue.

git reset --hard HEAD doesn't help too.

I have set core.ignorecase=true, doesn't help.

What's wrong here? Git on Windows is still bugging me like hell...

SilentGhost
  • 307,395
  • 66
  • 306
  • 293
Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172

1 Answers1

7

Did you set core.autocrlf to false (especially on Windows)?

See this answer for good reason to leave it to false.

Other causes could include a .gitattribute filter driver which would perform some changes on file content.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • hell yeah, the autorclf did the trick. Seems to be enabled by default and everyone else on the net recommends turning it on (that's what I did trying to fix my problems and it didn't work). – Johannes Rudolph Sep 16 '10 at 10:29
  • @Johannes: "everyone else on the net recommends turning it on"?? If so, I am definitively *not* in that camp ;) – VonC Sep 16 '10 at 10:39
  • Github is in this camp though (just recently discovered) http://help.github.com/dealing-with-lineendings/ – Johannes Rudolph Feb 10 '11 at 17:07
  • @Johannes: well, GitHub mentions setting it to '`input`', not 'true', forcing 'lf' to all files. I still maintain a "no automatic conversion of any kind" policy though ;) – VonC Feb 10 '11 at 18:35
  • GitHub advocates `input`for MacOs and Linux, for Windows they're all in for autorclf, which I don't like too :-) – Johannes Rudolph Feb 10 '11 at 19:21