개발 공부 기록

[git] mac에서 Github 계정 여러개 사용하기 본문

개발/git

[git] mac에서 Github 계정 여러개 사용하기

_김도연 2021. 9. 2. 20:11

1. Personal Access Token 생성

https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

 

Creating a personal access token - GitHub Docs

You should create a personal access token to use in place of a password with the command line or with the API.

docs.github.com

2. 기존 저장소에 유저 정보 설정

git remote set-url origin https://USERNAME@github.com/USERNAME/PROJECTNAME.git
git config --local user.name USERNAME
git config --local user.email USEREMAIL

3. git push

이때, 1번에서 생성한 Personal Access Token 정보를 등록해준다.

'개발 > git' 카테고리의 다른 글

[Git] git stash  (0) 2021.08.31
[git] PR을 병합하는 3가지 방법  (0) 2020.09.13
[git] Git branch 종류  (0) 2020.09.07
[git] 좋은 commit message 작성하기  (0) 2020.09.06
Comments