Ok. I really don't understand this. Occasionally file operations will result in
Git complaining that some files are different when nothing apparently has changed. This weird recipe seemed to fix the problem in a way that I do not understand.
Problem
git diff
shows the every single line of the file as changed, but
git diff -w
(i.e. ignore all whitespace) shows the file as changed, but shows no lines as changed.
Solution
1. Type this command to temporarily turn off
CRLF
automagical conversions:
git config core.autocrlf false; git config core.safecrlf false
2. Refresh the view in
Git gui
. There will be no changes indicated anymore.
3. Type this line to temporarily turn
CRLF
automagical conversions back
on:
git config core.autocrlf true; git config core.safecrlf true
4. Possibly repeat more than once, staging and un-staging in the mean time. Like I said, it's a mystery.
NOTE: I've only done this once. I haven't tested it multiple times. I'm just posting it here for posterity's sake in case I need to try this recipe again.