2

I run into this situation quite a lot and it really bothers the reviewer who is assigned to my pull request.

So basically what would happen is that I would add or delete couple of line(s) in the file and instead of showing that only change, it shows that the whole file is changed. How do I avoid those circumstances?

thedeliciousmuffin
  • 784
  • 1
  • 10
  • 22

1 Answers1

4

You need to check the nature of those differences.

For instance:

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

If they are eol-related (end of line characters), try cloning your repo again after a:

git config --global core.autocrlf false
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    You might also want to check to see if the local config has core.autocrlf set to true. git config --local --list and if it is true then use git config --local core.autocrlf false – Randy Leberknight Dec 20 '16 at 22:47
  • @RandyLeberknight True. That is why I always suggest to re-clone (elsewhere locally). That way, no more previous local config interference. – VonC Dec 20 '16 at 22:50