Anúncio
Anúncio

Mais conteúdo relacionado

Apresentações para você(20)

Similar a [5분 따라하기] git 다중 사용자 신원 설정 방법(19)

Anúncio

Mais de Jay Park(20)

Último(20)

Anúncio

[5분 따라하기] git 다중 사용자 신원 설정 방법

  1. [5분 따라하기] git 다중 사용자 신원 설정 방법 박재호(jrogue@gmail.com)
  2. 참고 자료 • <컴퓨터 vs 책> 블로그 • http://jhrogue.blogspot.com/ • OKdevTV 유튜브 방송 • 오늘 방송: https://www.youtube.com/watch?v=zr9HpPaew0M&list=PLdntWJk 2tJPLKNNYBVCxnde2PEB6dzbSL&index=2 • 개발 이야기 리스트: https://www.youtube.com/playlist?list=PLdntWJk2tJPKvRB0mSqC5t yKUv7HFtcqg • 슬라이드 셰어 • https://www.slideshare.net/jrogue/presentations
  3. 오늘 소개할 내용 • git에서 다중 사용자 설정 방법 • 회사 계정과 개인 계정이 있을 경우에 어떻게 할 것인가? • 프로젝트가 몇 개 안 되면 혼동이 없지만… 여러 개가 되면 관리가 어려워진 다. • 자동화된 방법을 고민해보자!
  4. git 명령 중 config와 alias 탐험 • git config 명령 • --global을 붙일 경우 ~/.gitconfig 아래 필요한 정보를 저장 • --global을 붙이지 않을 경우 현재 git 저장소 .git/config 아래 필요한 정보 를 저장 → 커밋할 때 여기 저장된 사용자/이메일 정보를 활용 • git alias • 깃에서 alias를 정하면 명령을 임의로 만들 수 있다 • 아이디어 • git config 명령으로 전역 설정한 내용을 지역 설정한 내용으로 적용하면 어 떨까?
  5. 스크립트 $ git config --global --unset user.name $ git config --global --unset user.email $ git config --global user.useConfigOnly true $ git config --global user.company.name "foo" $ git config --global user.company.email "foo@example.com" $ git config --global user.personal.name "bar" $ git config --global user.personal.email "bar@example.com" $ git config --global alias.identity '! git config user.name "$(git config user.$1.name)"; git config user.email "$(git config user.$1.email)"; :' $ cd ~ $ mkdir -p git/repo $ cd ~/git/repo $ git init $ git config user.email $ git identity company $ git config user.email $ git identity personal $ git config user.email
  6. 보면서 따라해봅시다~~~ • https://asciinema.org/a/zoiGlWIz6Cta479KkMHosX5H9
Anúncio