Last active
February 3, 2017 11:26
-
-
Save alextercete/46d06968fd90a7237d9e2827aa1dc886 to your computer and use it in GitHub Desktop.
Remove BOM from all text files tracked by Git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git grep -I --name-only --null $'\xEF\xBB\xBF' | xargs -0 sed -i '1 s/^\xef\xbb\xbf//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment