Reputation: 6058
Is it possible to figure out only the deleted lines of a file by git diff
command?
Currently git diff
shows both the modified lines and deleted lines shown in the picture.
Upvotes: 4
Views: 2722
Reputation: 1553
One way to do that using bash
would be:
git diff | grep "^-[^-]"
, it keeps only the lines starting with a -
and do not have a second character -
following, intended to avoid printing the files that contain the change.
Upvotes: 4