3 ms·
From the git documentation: *core.editor* *By default, Git uses whatever you’ve set as your default text editor via one of the shell environment varia
by YeGoblynQueenne 6y ago
From the git documentation:
*core.editor*
*By default, Git uses whatever you’ve set as your default text editor via
one of the shell environment variables VISUAL or EDITOR, or else falls back
to the vi editor to create and edit your commit and tag messages*
https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
It seems that many people leave their default editor undefined so git opens vi for commit messages by default. vi tends to be symlinked to vim on many systems so that means they end up in vim (not that it makes a difference, I'm just being pedantic :).
- lordgrenville 6y agoYeah, I think the most common case is git beginners typing `git commit` without the -m flag. This was my first (unwilling) baptism into Vim.
- recursive 6y agoUg yes. This is why I always pass -m to commit, at the risk of losing the containing terminal session to forcible closure. I know quitting it is colon exclamation something or other, but it's always quicker just to start from scratch than to look it up.