Epikem
2/14/2018 - 8:52 PM

How to : Use vscode as Github sequence editor Vim 대신에 사용하려다 찾음. From : https://stackoverflow.com/questions/30024353/how-to-use-visual-stud

How to : Use vscode as Github sequence editor

Vim 대신에 사용하려다 찾음.

From : https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git/36644561

From :
https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git/36644561

1. 터미널 열기.
2. code --help 정상 출력되는지 확인.
3. git config --global core.editor "code --wait"
4. git config --global -e
5. 열리는 깃헙 글로벌 에디터 설정에 다음 내용 추가.

[diff]
    tool = default-difftool
[difftool "default-difftool"]
    cmd = code --wait --diff $LOCAL $REMOTE
    
6. 끝.
    
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 Code
git commit allows to use VS Code for the commit message
git add -p followed by e for interactive add
git difftool <commit>^ <commit> allows to use VS Code as diff editor for changes