2

I have got some files automatically modified in my git repository. git status shows them as modified. When I do git reset --hard HEAD, those files are still being shown as modified and current time as modified time.

Probably some process is modifying them. How to know what is happening?

Shashwat Kumar
  • 5,159
  • 2
  • 30
  • 66

1 Answers1

0

Check the differences involve eol (end of line: lf vs. crlf), as I do here:

git -c color.diff.whitespace="red reverse" diff -R -- aChangedFile

If would recommend setting core.autocrlf to false, and try to renormalize the index (Git 2.16+)

git add --renormalize .

Then check your git status.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Its not crlf issue. There is some process seems to be updating the files. The changes are not trivial. Some meaningful content is there in the diffs. – Shashwat Kumar Nov 12 '18 at 10:49
  • @ShashwatKumar Do you have an example of such modifications? Are you using XCode? What version of Git are you using? – VonC Nov 12 '18 at 11:38