REF.: How to use VS Code as your Git editor, difftool, and mergetool by Rob O'Leary
REF.: Visual Studio Code Homepage
REF.: nano – Text editor Homepage
REF.: Git - git-mergetool Documentation
REF.: Git - git-difftool Documentation
git config --global core.editor 'code --wait'
# or
git config --global core.editor 'code --wait --new-window'
# skip '--global' to use for current project only
or
-
Type
git config --global -e
to open in editor, and add following lines:[core] editor = code --wait # --new-window
git config --global --unset core.editor
# default is Nano
git config --global diff.tool vscode
git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE'
or
-
Type
git config --global -e
to open in editor, and add following lines:[diff] tool = vscode [difftool "vscode"] cmd = code --wait --diff $LOCAL $REMOTE
git config --global merge.tool vscode
git config --global mergetool.vscode.cmd 'code --wait $MERGED'
git config --global mergetool.vscode.trustExitCode true
or
-
Type
git config --global -e
to open in editor, and add following lines:[merge] tool = vscode [mergetool "vscode"] cmd = code --wait $MERGED trustExitCode = true