이 포스트는 유튜브 채널 '드림코딩 by 엘리'의 '깃, 깃허브 제대로 배우기 (기본 마스터편, 실무에서 꿀리지 말자)' 를 정리한 글임을 밝힙니다. (https://www.youtube.com/watch?v=Z9dvM7qgN9s&t=30s)
git config --list
git config --global -e
- vscode로 git configuration이 이뤄지는 동안에 terminal을 사용 허락
git config --global core.editor ="code"
- vscode로 git configuration이 이뤄지는 동안에 terminal을 사용 금지
git config --global core.editor ="code --wait"
- username, email 설정
git config --global user.name "user_name" git config --global user.email "user_email"
- username, email 확인
git confiug user.name # username 확인 git config user.email # email 확인
- Window는 \r\n (Carriage return + Line feed)로 줄바꿈을 표시
- Linux(+ Mac)은 \n (Line feed)로만 줄바꿈을 표시
- 따라서 서로 다른 OS가 협업을 하려면 autocrlf를 통해 줄바꿈 기호를 통일해야 함
- Window
git config --global core.autocrlf true
- Mac (or Linux)
git config --global core.autocrlf input