[git] warning LF will be replaced by CRLF , 경고 메시지 안보게 하기
-------------------------------------------------------------------------------
git 경고 메시지
warning: in the working copy of '', LF will be replaced by CRLF the next time Git touches it
-------------------------------------------------------------------------------
# core.autocrlf 설정 확인
- 항목별 확인
git config --local --get-all core.autocrlf
git config --global --get-all core.autocrlf
git config --system --get-all core.autocrlf
- 전체 확인
git config --list | grep autocrlf
---------------------------------------
# core.autocrlf 설정 true로 설정
- local, global, system 3개의 core.autocrlf 설정을 모두 true로 설정
- 현재 레포의 local 설정 (아래에서 --local 은 생략 가능)
git config --local core.autocrlf true
- 현재 사용자(global) 설정
git config --global core.autocrlf true
- 시스템 전체(system) 설정 (관리자 권한 필요할 수 있음)
git config --system core.autocrlf true
-------------------------------------------------------------------------------
- 윈도우
git config core.autocrlf true
- CRLF 을 원격 저장소에 push 할때 자동으로 LF 로 변경 해서 push
- 맥, 리눅스
git config core.autocrlf input
- LF를 개행문자로 인식
- 경고 메시지 감추기
git config core.safecrlf false
개행 관련 에러를 출력하지 않는다.
//=========
// 참고
https://www.lesstif.com/pages/viewpage.action?pageId=20776404
https://blog.jaeyoon.io/2018/01/git-crlf.html
https://git-scm.com/docs/gitattributes/1.7.3.3
https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important