set vim as git commit default editor
git config --global core.editor "vim"
echo "export EDITOR='vim'" >> ~/.profile
export EDITOR='vim'
export VISUAL=vim
# ~/.bashrc
export GIT_EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim -g '
When I issue
git commit then I get a macvim editor but on the command line I see this message
$ git commit
Aborting commit due to empty commit message.
#work well
export GIT_EDITOR='/usr/local/bin/mate -w'
then you need
git config --global core.editor "mvim -f"
git config --global core.editor 'mvim -f --nomru -c "au VimLeave * !open -a iTerm"'