Leandro Cavalcante
Posted on September 6, 2022
Paste the following lines in your ~/.gitconfig
file:
# This is Git's per-user configuration file.
[core]
editor = code --wait
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = default-mergetool
[mergetool "default-mergetool"]
cmd = code --wait $MERGED
Done! Next time you do a git commit
or whatever operation that needs a text editor, Visual Studio Code will be opened as your default editor.
💖 💪 🙅 🚩
Leandro Cavalcante
Posted on September 6, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.