Git diff: is it possible to show ONLY changed lines
I'm trying to get only new version of lines which have changed and not all the other info which git diff shows. For: git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix It shows: diff --git file1 file2 index d9db605..a884b50 100644 --- file1 +++ file2 @@ -16 +16 @@ bla bla bla -old text +new text what I want to see is only: new text Is it possible? Only added lines does not make sense in all cases. If you replaced some block of text and you happend to include a single line which was there before, git has to match and guess. - Usually the output of git diff could be used as input