깃 diff, commit message 등의 명령에서 vim 인터페이스 대신 vscode를 기본 에디터로 사용
- 터미널 열기.
- code --help 정상 출력되는지 확인.
- git config --global core.editor "code --wait"
- git config --global -e
- 열리는 깃헙 글로벌 에디터 설정에 다음 내용 추가.
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
- 끝.
This leverages the new
--diff
option you can pass to VS Code to compare two files side by side.To summarize, here are some examples of where you can use Git with VS Code:
git rebase HEAD~3 -i
allows to interactive rebase using VS Codegit commit
allows to use VS Code for the commit messagegit add -p
followed bye
for interactive addgit difftool <commit>^ <commit>
allows to use VS Code as diff editor for changes
- git
- vscode
#git, #vscode