최초 Git 설정

1349 단어 gitgit

참고 : https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

모든 설정값 확인

$ git config --list

특정값 확인

$ git config user.name 

모든 설정값과 해당 위치 확인

$ git config --list --show-origin

사용자 이름 및 이메일 설정

$ git config --global user.name "Yera Lee"
$ git config --global user.email 

* global 옵션을 전달할 경우 한번만 수행해도 됨.

설정값 지우기

$ git config --unset user.name
$ git config --unset user.email

$ git config --unset --global user.name
$ git config --unset --global user.email

* global 로 설정한 경우 global로 지워야 함

편집기 설정

$ git config --global core.editor emacs
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

* Windows 시스템에서 다른 텍스트 편집기를 사용하려면 실행 파일의 전체 경로를 지정해야 함.

기본 Branch 설정

$ git config --global init.defaultBranch main

* 왜 안되지?

좋은 웹페이지 즐겨찾기