Git
유용한 git 설정
Socratone
2020. 9. 29. 22:46
1. global 영역에 이름을 설정한다.
git config --global user.name "socratone mac"
이름에 띄어쓰기가 들어갈 경우 쌍따옴표로 string을 감싸야 한다.
2. global 영역에 이메일을 설정한다.
git config --global user.email socratone@gmail.com
3. git commit 명령어로 git을 편집할 때 쓸 editor를 설정한다.
git config --global core.editor "code --wait"
비쥬얼 스튜디오와 같은 에디터를 열기 위한 code 명령어가 제대로 설정되어 있어야 잘 작동된다.
code 명령어를 설정하려면 아래 링크를 참고하자.
--wait 플래그는 editor가 실행될 때 터미널을 잠시 멈추라는 옵션이다.
4. git의 모든 설정을 확인할 수 있다.
git config --global -e
위에서 입력한 내용들이 여기 저장된다.