How to set Xcode as core.editor in git?
It's all about syntax sometimes :-)

git config --global core.editor 'xed -w'


Not sure whether you really want to wait for Xcode to launch each time you git commit something. Maybe vi or nano are the better options here.