Remove trailing whitespace from text files in a git repo.
From git help grep
:
-l, --files-with-matches, --name-only, -L, --files-without-match
Instead of showing every matched line, show only the names of files that contain
(or do not contain) matches. For better compatibility with git diff, --name-only
is a synonym for --files-with-matches.
-I
Don’t match the pattern in binary files.
-E, --extended-regexp, -G, --basic-regexp
Use POSIX extended/basic regexp for patterns. Default is to use basic regexp.
And, from man sed
:
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)