Ensure an EOF-newline for every git-tracked text file (that changed since the main branch), except for .meta files (opens in new tab)
git diff --diff-filter=ACMRTUX --name-only main -z | grep -zvE '(.meta)' | xargs -0 dos2unix --add-eol - (Ensure an EOF-newline for every git-tracked text file (that changed since the main branch), except for .meta files Ignores deleted files since main. dos2unix already skips binary files. Safely NUL-delimited. Add -i for a dry run.). The best command line collection on the internet, submit yours and save your favorites.
Read the original article