Error:
$ git commit
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
Fix:
$ git config --global core.editor vim -f
Reference:
-f Foreground. For the GUI version, Vim will not fork and detach from the shell it was started in.
On the Amiga, Vim is not restarted to open a new window. This option should be used when Vim is
executed by a program that will wait for the edit session to finish (e.g. mail). On the Amiga
the ":sh" and ":!" commands will not work.