최근 보안상의 이유로 Remote Repository 접속시 패스워드 대신 Token 사용
사용자 메뉴(우측 상단 동그라미 아이콘) - Setting - Developer setting - Personal access tokens
Token 이름 입력 - expiration선택 + repo 선택 - Generate token
Token 생성 이후에는 Token값이 보이지 않으므로 저장 잘 해두기
Remote Repository 등록
Local Repository에 연동할 Remote Repository를 등록
생성해둔 Remote Repository로 이동 후 (https)주소 복사
Remote Repository 등록
# origin이라는 이름으로 이주소에 있는 repo를 local repo랑 연결
# 복붙 => shift + insert
# 아래처럼 하면 ID, PW를 매번 연동해야함
git remote add origin 주소
# Remote Repository 등록 with Username and Token
git remote add origin https://<username>:<token>@github.com/<repository>.git
# Remote Repo의 정보 확인
git remote -v
Remote Repo에 변경내용 Push
Local Repository(HEAD)에 반영된 변경내용을 Remote Repo에도 반영하기 위해 Git push 사용
git push origin mastrer/main
# 기본적으로 생성되는건 master 혹은 main 브랜치
git push origin master
Remote Repository에 Pull
Remote Repository의 내용에 맞춰 Local Repository를 갱신하려면 Git pull을 사용