How to set Xcode as core.editor in git? My current git config core.editor returns dreamweaver which I set up two years ago from inside the app(IIRC), and now I don't use it. I am receiving error while amending the author of the last commit.  

~$ git commit --amend --author="me &lt;my@mail&gt;"
hint: Waiting for your editor to close the file... fatal: cannot run 
dreamweaver: No such file or directory
error: unable to start editor 'dreamweaver'


How do I set it to use Xcode? I tried 

git config --global core.editor="xcode"
error: invalid key: core.editor=Xcode


And from https://stackoverflow.com/questions/53550025/git-unable-to-start-xcode-from-terminal-on-mac-os-x, even though xed launches Xcode. 

$ git config --global core.editor="xed"
error: invalid key: core.editor=xed


xed -w also launches Xcode so I tried the same instead of ="xed -w" but same error.
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.