![[Git Error] LF will be replaced by CRLF the next time Git touches it 1 [Git Error] LF will be replaced by CRLF the next time Git touches it](https://i0.wp.com/allhoneytip.com/wp-content/uploads/2023/11/image-49-optimized.png?resize=785%2C65&ssl=1)
Git Error
LF will be replaced by CRLF the next time Git touches it
git add 시에 발생하곤 하는 에러입니다. Git이 개행(Line Endings)을 자동으로 변환하려고 할 때 나타나는 에러로 간단하게 해결할 수 있습니다.
LF & CRLF
Line Feed(\n)와 Carriage Return Line Feed(\r\n)로, 개행 기준이라할 수 있습니다.
Git은 core.autocrlf 설정으로 시스템끼리의 개행 차이를 관리합니다.
![[Git Error] LF will be replaced by CRLF the next time Git touches it 2 [Git Error] LF will be replaced by CRLF the next time Git touches it](https://i0.wp.com/allhoneytip.com/wp-content/uploads/2023/11/image-48-optimized.png?resize=618%2C214&ssl=1)
해결 방법
개행 변환 권한을 허용해주면 됩니다.
– 윈도우(Window)
git config --global core.autocrlf true
만약, 변환을 허용하지 않고 있는 그대로 올리시려면 아래처럼 false 처리 해주면 되지만, 권장되지 않습니다.
git config --global core.autocrlf false
– 맥(macOS) or 리눅스(Linux)
git config --global core.autocrlf input
– 해결
![[Git Error] LF will be replaced by CRLF the next time Git touches it 3 [Git Error] LF will be replaced by CRLF the next time Git touches it](https://i0.wp.com/allhoneytip.com/wp-content/uploads/2023/11/image-47-optimized.png?resize=406%2C91&ssl=1)
답글 남기기