// Just the exclude diff lines changed
git diff --stat master -- ':(exclude)*package-lock.json'
// Detailed output on changed lines count
git log --author="<[email protected]>" --pretty=tformat: --numstat -- ':(exclude)*package-lock.json' | awk '{inserted+=$1; deleted+=$2; delta+=$1-$2; ratio=deleted/inserted} END {printf "Commit stats:\n- Lines added (total).... %s\n- Lines deleted (total).. %s\n- Total lines (delta).... %s\n- Add./Del. ratio (1:n).. 1 : %s\n", inserted, deleted, delta, ratio }' -
// Output example
Commit stats:
- Lines added (total).... 7882
- Lines deleted (total).. 3919
- Total lines (delta).... 3963
- Add./Del. ratio (1:n).. 1 : 0.497209