FirstBoot Guides

Git 설치 후 필수 설정 및 검증 가이드

Git 설치가 끝났나요? 커밋을 하기 전에 반드시 설정해야 할 항목들과 자주 발생하는 문제를 해결해 봅시다.

1. 사용자 정보 설정 (user.name / email)

증상: 커밋 시 "Author identity unknown" 에러 발생

원인: Git이 누가 커밋했는지 정보를 모를 때 발생합니다.

해결: 다음 명령어를 입력하세요.

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

2. 줄바꿈 설정 (Line Ending)

증상: Windows와 Mac/Linux 협업 시 파일 변경이 멋대로 일어남

원인: OS마다 줄바꿈 방식(LF vs CRLF)이 다르기 때문입니다.

해결: autocrlf 설정을 켭니다.

# Windows
git config --global core.autocrlf true

# macOS/Linux
git config --global core.autocrlf input

3. SSH 키 등록 및 확인

증상: Permission denied (publickey) 에러 발생

원인: 원격 저장소에 내 PC의 공개키가 등록되지 않았습니다.

해결: 키를 생성하고 저장소(GitHub 등)에 등록하세요.

ssh-keygen -t ed25519 -C "you@email.com"
cat ~/.ssh/id_ed25519.pub

1분 확인 커맨드

git config --list
ssh -T git@github.com

관련 가이드