Git & Github 입문 - Git configuration

WonJu Lee·2021년 7월 7일
0

Git & Github

목록 보기
1/9

이 포스트는 유튜브 채널 '드림코딩 by 엘리'의 '깃, 깃허브 제대로 배우기 (기본 마스터편, 실무에서 꿀리지 말자)' 를 정리한 글임을 밝힙니다. (https://www.youtube.com/watch?v=Z9dvM7qgN9s&t=30s)

1. Git 설정 확인

git config --list

2. Git 설정을 text editor로 열기

git config --global -e

3. vscode로 text editor설정하기

  • vscode로 git configuration이 이뤄지는 동안에 terminal을 사용 허락
git config --global core.editor ="code"
  • vscode로 git configuration이 이뤄지는 동안에 terminal을 사용 금지
git config --global core.editor ="code --wait"

4. Username, E-mail 설정

  • 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 확인

5. autocrlf 설정

  1. Window는 \r\n (Carriage return + Line feed)로 줄바꿈을 표시
  2. Linux(+ Mac)은 \n (Line feed)로만 줄바꿈을 표시
  3. 따라서 서로 다른 OS가 협업을 하려면 autocrlf를 통해 줄바꿈 기호를 통일해야 함
  • Window
git config --global core.autocrlf true
  • Mac (or Linux)
git config --global core.autocrlf input
profile
Don't make excuses

0개의 댓글

관련 채용 정보