Pull request in git showing full diff for few files even though it has changes in few lines. Dont know how to fix this problem. If there is any git command which will fix this pls let me know.
Asked
Active
Viewed 907 times
-1

RCS
- 1,370
- 11
- 27
-
1Possible duplicate of [git-diff to ignore ^M](https://stackoverflow.com/questions/1889559/git-diff-to-ignore-m) – Martin van Wingerden Sep 26 '19 at 07:38
-
This is related to changing of newlines windows (\r\n) vs Linux (\n), you can find enough existing questions about this. – Martin van Wingerden Sep 26 '19 at 07:39
-
My pull request is not having ^M. Also tried to save file to unix like :e ++ff=dos then :set ff=unix & :wq. It also didn't helped. – RCS Sep 26 '19 at 07:42
-
Did you replace tabs by spaces or vice/versa? – Martin van Wingerden Sep 26 '19 at 07:43
-
No i did not replaced tabs or vice versa – RCS Sep 26 '19 at 07:44
-
Can you then clarify what you see? Maybe with a screenshot or output of the command line? A pull request is not directly in git, what software are you using for that? – Martin van Wingerden Sep 26 '19 at 07:45
-
I am using eclipse to push the changes to remote repository & from github raised pull request. – RCS Sep 26 '19 at 07:47
-
See https://stackoverflow.com/a/58037244/6330106. – ElpieKay Sep 26 '19 at 12:06
1 Answers
0
There is a Diff setting button in the pull request. Click on it then apply Hide whitespace changes. Solved the problem.

RCS
- 1,370
- 11
- 27
-
What whitespace other than tabs/spaces or newlines do you think this ignored for you? – Martin van Wingerden Sep 26 '19 at 18:14
-
I am not seeing the same line has removed and added anywhere in pull request. – RCS Sep 27 '19 at 05:28