문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top