In the past, whenever I wished to edit a commit message, squash commits, or anything else git-related that requires dealing with the default Git editor (Vim in most cases), it always felt overwhelming. That's mainly due to me not being used to Vim.
When I discovered it was possible to set up Visual Studio Code (or VSCode) to achieve just this, it was such a relief! In this article, I go through the steps to set up VSCode as your Git editor.
Steps
Add the following in
~/.gitconfig, under[core].editor = code --wait[Optional] I like to use GitLens' interactive rebase editor to get a GUI when rebasing. Hit
Ctrlorcmd+Shift+Pin VSCode, type 'GitLens: Enable Interactive Rebase Editor' and pressEnter. Reload VSCode. Next time you rungit rebase -i, a GUI will pop up inside VSCode.
