[Git/Github] Git 설치 후 해야할 것

원서연·2023년 10월 29일
0

1. default branch

git config --global init.defaultBranch # 확인
git config --global init.defaultBranch main # 안되어 있으면

2. user email

git config --global user.email # 사용자 email 확인
git config --global user.email "깃허브에 가입할 때 사용한 이메일 혹은 자주 사용하는 이메일" # 안 되어 있으면
  • user email은 깃허브 가입할 때 사용한 이메일을 설정하는 것이 관례이다.

3. user name

git config --global user.name # 사용자 이름 확인
git config --global user.name "깃허브 ID" # 안 되어 있으면
  • user name은 깃허브 ID을 설정하는 것이 관례이다.

원격 리포지터리 연결

git remote -v # 연결되어 있는 원격 리포지터리 목록, 현재는 없음
git remote add origin https://github.com/tjdus9503/tb-2023-10-25 # 원격 리포지터리 연결
git remote -v # 연결되어 있는 원격 리포지터리 목록, origin 출력됨
profile
웹 백엔드 프로그래밍 Today I Learned

0개의 댓글