Get rid of "fatal: CRLF would be replaced by LF in [file]"
This will get rid of one of my least favorite git-related error messages:
Install dos2unix
brew install dos2unix
-- OR --
apt-get install dos2unix
Change line endings on files recursively
find /core/sites/all/modules -type f -exec dos2unix {} +
Written by Jeremy Frazao
Related protips
3 Responses
Thank you, the recursive conversion spared me many minutes of drudgery and potential misses!
over 1 year ago
·
yeah, 2nd time I write that today ... but you made my day ... or even better, evening ... after brewing dos2unix i'll have a beer now ;-)
over 1 year ago
·
If you use the fish shell, run dos2unix **
from the top level of your project and it will recursively convert all files (except for hidden files).
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#