3 ms·
How do you make naked `git commit` default to emacs?
by TouchyJoe 6y ago
How do you make naked `git commit` default to emacs?
- tjdetwiler 6y agogit config --global core.editor <EDITOR>
- steveklabnik 6y agoIt also respects $EDITOR, though that would impact more than just git, of course.
- mulmen 6y agoI believe the default is simply to open your default editor so just set $VISUAL (and $EDITOR, read the manual for your shell) in your environment. This has the added benefit (?) of using that editor for commands that open a visual editor such as crontab -e or even visudo (with some caveats of course). If you want to use a different editor just for git you can set $GIT_EDITOR in your environment.