If you are using gvim, you need to make sure that it stays in the foreground, otherwise it will return control to git before you’ve had a chance to edit and save your message. Specifying the -f switch as part of the editor setting should enable this.
gvim -f
You have multiple values set for your core.editor setting which is causing a problem. You need to have just one setting.
Try:
git config --global --unset-all core.editor
git config --unset-all core.editor
git config --global core.editor "gvim -f"