git config --edit
opens the config file in sublime text (Awesome)
Maybe could be useful to open an editor from a script shared in a git repository, without assuming which editor could have anyone will use that script, but only that they have git.
Here you can test if editor is set in git config, and also open files not associated with that editor:
alias editor="$(git config core.editor)"
if [ "$(alias editor | sed -r "s/.*='(.*)'/\1/")" != "" ]; then
editor
else
start
fi
Works great with my .gitconfig on windows:
[core]
editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin