Github Directory에 따라 다른 프로필 사용하기 feat.Macbook

Gary's Note·2024년 6월 29일
1

github

목록 보기
1/2
post-thumbnail

1. ToDo

- 맥북 터미널에서 Github 계정 여러개 설정하기(feat.폴더별)


2. How To Do??

기본적으로 이 포스트를 기준으로 설정이 되어있어야 한다

1. A Directory에 .gitconfig-a 생성

touch .gitconfig-a

2. .gitconfig-a에 Profile 내용 입력

[user]
	email = email@email.com
	name = github-username

3. 다른 Directory에도 동일하게 적용

4. ~/.gitconfig로 이동 후 편집

[includeIf "gitdir:[작업 경로 A]"]
  	path = ~/.gitconfig-a

[includeIf "gitdir:[그 외 다른 작업 경로 b"]
  	path = ~/.gitconfig-b
(~ 더 있다면 쭉 계속 추가)
profile
_reap what you sow_

0개의 댓글