Remove "no newline at end of file" changes from git stage

From the linked related issue, I found that git diff --ignore-all-space would ignore files with only whitespace changes. git diff --ignore-all-space --name-only doesn't work as I expected it to, but this does:

git diff --ignore-all-space | grep "+++"

This gave me a list of files that have changes other than whitespace, which is small enough that I can just add them all manually to the stage and commit.

Thanks to everyone for the comments, they were very helpful.

Tags:

Git

Newline

Sed