woniper

mac에서 visual studio code를 git commit editor로 설정하기 본문

개발환경

mac에서 visual studio code를 git commit editor로 설정하기

woniper1 2018. 1. 31. 22:22

Visual Studio Code를 사용해 Git 커밋 메시지 작성하기 라는 글을 보고 visual studio code를 git editor로 설정하기로 했다. 간단하지만, 기록을 남기기 위해서 블로깅한다.

  1. Visual Studio Code Download
  2. Visual Studio Code (이하 VSC) 경로 확인
    • mac 환경에서는 보통 /Volumes/HD/Applications/ 디렉토리 하위에 설치될 것이다.
  3. $ git config --global core.editor "/Volumes/HD/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --wait"
    • 위 경로는 예시일뿐 2번에서 경로를 확인 후 $git config 명령을 입력한다.
    • /Volumes/HD/Applications/Visual\ Studio\ Code.app까지만 입력해도 된다고 생각하겠지만 그렇지 않다. /Volumes/HD/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --wait 까지 모두 입력해야한다.
  4. 50/72 규칙을 적용하기 위해 VSC 설정을 해야한다.
    • VSC 실행
    • Code > 기본 설정 > 설정 (단축키 command + ,)
    • 아래 설정 코드를 입력
{
"[git-commit]": {
    "editor.fontFamily": "D2Coding",
    "editor.rulers": [
        50,
        72
    ]
    }
}
Comments