키보드에서 return 키를 누를 때마다 line-ending이라는 보이지 않는 문자가 운영 체제마다 줄 끝을 다르게 처리한다.
Window : CR(Carriage-Return, \r) or LF(Line Feed, \n)
Unix or Mac OS : LF 만 사용
즉, Github협업 중일때 window와 mac 두개를 같이 사용할 경우, 두 OS가 다른 line-ending 문자로 다르게 처리하기 때문에 예기치 못한 에러가 발생할 수 있다.
따라서 line-ending에러가 날 경우, line-ending을 공통으로 맞춰주어야한다.
$ git config --global core.autocrlf true
# Configure Git to ensure line endings in files you checkout are correct for Windows.
# For compatibility, line endings are converted to Unix style when you commit files.