git config --global core.editor vim

Category: Git - Core

git config --global core.editor vim

Set global default editor for git messages

Sets the text editor that Git opens when you need to write a commit message or do an interactive rebase.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.