How to change the default editor?

git config core.editor editor

To change the default editor used by git use git config core.editor editor.of.your.choice. The next time git needs an editor (for merging, editing etc.), it will use your configured editor.

Layer 1
Terminal Example
git config core.editor subl


See git config to learn more about it.

Last modified on November 30, 2021.

You might also like