git set default editor to vim code example
Example 1: set git editor to vim
git config --global core.editor "vim"
Example 2: git commit --amend choose editor
git config --global core.editor "/bin/nano"
git config --global core.editor "vim"
git config --global core.editor "/bin/nano"