4

I work on Mac OS, but to date this problem has only occurred on my MacBook Air with an SSD hard drive. I do a fresh checkout of a number of different repos and status shows me a long list of modified files (without touching anything). It seems to be third party javascript and css files. That with what else I've read seems to be line endings, but despot setting:

git config --global core.autocrlf input

As suggested here http://help.github.com/line-endings/ and then checking out. Has the same problem.

Help =(

Rich Standbrook
  • 648
  • 7
  • 20
  • After you change your `core.autocrlf` setting, delete all your tracked files, then `git reset --hard` to bring them back. That will force the line endings to be reprocessed in all files. NOTE: It will also wipe out any uncommitted changes, so take care of those first. – Ryan Stewart May 28 '12 at 19:52

2 Answers2

0

Try rather first:

git config --global core.autocrlf false

That will prevent any "automagic" conversion.

See also "Distributing git configuration with the code" for alternative ways to manage eols.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

as pointed in the other answer,

git config --global core.autocrlf false

If you have files that correctly store line endings as crlf, you should also suppress the highlighting of the "cr". Git diff and other patch outputs will highlight potentially problematic whitespace. You can suppress this with:

git config --global core.whitespace cr-at-eol

Remember that --global will make this effective for all your repositories when you are logged in as that same user to the machine. To apply the setting to any user, use --system instead. Conversely, you can apply a setting to just the current repo by using --local. --local is implied if a scope option is not given.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • I just can't get this figured. It is refusing to acknowledge the files as unchanged. I have set `git config --global core.autocrlf false` and `git config --global core.whitespace cr-at-eol` delete, reset, removed entirely and started again. Is there anything else that could be telling git they've changed do you think? I'm on a MavBook Air running Lion. – Rich Standbrook Jun 15 '12 at 09:49