Reputation: 825
I started a git repository on a Windows machine, and then I changed to a Linux machine. Everything is working fine, but every time I commit, I get the warning warning: CRLF will be replaced by LF in [file]
.
I know I can set auto conversion off but, is there a command to convert all line endings into the Linux's form?
I am not going to work with this project in Windows any more.
Thanks in advance.
Upvotes: 2
Views: 1272
Reputation: 64308
There is a dos2unix command which will change a text file from dos format (using CR LF) to unix format (using just LF). Using that, you can easily do something like
dos2unix *.c *.h
Upvotes: 3