[컴] sublime text 를 git core.editor 로 사용하는 방법

 git config / git command/ sublimetext / sublime text 를 에디터로 사용하는 방법 설정 하는 방법 / 서브라임

sublime text 를 git core.editor 로 사용하는 방법

git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"

주의할 점

만약 아래같은 command 를 실행하면 sublime text 가 떠서 message 를 입력받게 된다. 이때 바로 적고나서 tab 을 close 를 하면 잘 동작한다.

git tag -a v1.2.3 de472b4ec496df4f6df58bbe3fbb5656eae9fef5

하지만 만약 message 작성을 위한 tab이 열리고 나서, 다른 tab 으로 옮겨간 뒤에 다시 원래 git message tab 으로 돌아와서 글을 작성한 후에 close 를 하면 cmd.exe 에서 close 를 인식하지 못한다.

hint: Waiting for your editor to close the file...

그래서 무엇인가 복사해서 넣을 생각이라면, git tag 등 git command 를 실행하기 전에 복사를 해놓고, message 를 바로 붙여놓고, 처리를 하는 쪽이 나을 듯 하다. 또는 sublime text 외의 다른 text editor 를 열어놓고, 작업을 해도 된다.

댓글 없음:

댓글 쓰기