Created
June 10, 2014 15:37
-
-
Save esebastian/76b0f4c5191cf7829a71 to your computer and use it in GitHub Desktop.
Convert DOS CRLF newlines to Unix/Linux LF in all text files in a Git repo
This file contains 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
git ls-files | xargs perl -le 'for (@ARGV) { print if -f && -T }' | xargs perl -pi -e 's/\r\n/\n/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment