Reputation: 11774
I submitted a commit with some fixes here and there, but github is not correctly showing the differences (e.g this line removed, this one added, etc). It just shows two big walls of code, one red (removed code) and one green (added code).
This is not the first time it happen to me, and this last time I was extra careful to not mess with any other parts of my code. I must be doing something wrong, every free online tool I have tried shows the text differences easily.
How can I prevent this from happening again?
Note: in case it matters, I am using Windows and submitting them via their downloadable thingy.
Upvotes: 1
Views: 191
Reputation: 67669
This looks like the standard Git on Windows line ending related issue ;-)
Running the following command in the bash command line interface should fix your problem.
$ git config --global core.autocrlf true
See this GitHub help page for more information about this subject.
Upvotes: 4