Quick
git config --global core.editor /usr/bin/vim
Story
I got this message while doing a
git commit --amend
My fish reported
~/worp (develop →+) git commit --amend error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.
As I normally use Vim instead Vi, first I tried to set my default editor to Vim in my fish.config:
vim ~/.config/fish/config.fish ... 13 # Set vim as visual editor default 14 set -gx VISUAL vim 15 set -gx EDITOR "$VISUAL"
But that didn’t help. So I found this guy: Fixing “There was a problem with the editor ‘vi'” for Git on Mac OS X Snow Leopard. Which was confirmed here: Using Vim for git commit messages.
Which did fix the problem! Simply execute the following and it’s fixed!
git config --global core.editor /usr/bin/vim