git add 시 해당 오류를 발견하였다.
warning: in the working copy of '파일경로', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '파일경로', LF will be replaced by CRLF the next time Git touches it
해당에러는 맥 또는 리눅스를 쓰는 개발자와 윈도우 쓰는 개발자가 Git으로 협업할 때 발생하는 Whitespace 에러이다. 유닉스 시스템에서는 한 줄의 끝이 LF(Line Feed)로 이루어지는 반면, 윈도우에서는 줄 하나가 CR(Carriage Return)와 LF(Line Feed), 즉 CRLF로 이루어지기 때문에 발생한다.
=> 해결방안: core.autocrlf 켜기
git config --global core.autocrlf true
'Issue > Git' 카테고리의 다른 글
[Git] gitignore 특정 파일/폴더 무시 (0) | 2024.04.26 |
---|