I am using git repository. Everything is working properly except git diff command. Whenever I modify any file then git diff command showing entire file is modified even though I
Try running this command. It works fine for me:
git diff -U0 Filename | grep -v "diff\|index\|@@\|+++\|\---"
This command is basically removing lines containing "diff" , "index", "---" ,"+++" , "@@" using "grep -v" command and -U0 removes extra lines displayed above and below the modified lines.
Try this for a file with one line change, you will understand it better :)