Esc -> : -> q -> ! -> Enter
Esc
:
q
!
Enter
git config --global core.editor="nano" might help you, too :)
git config --global core.editor="nano"