Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
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 <my@mail>"
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.
–
–
–
–
I would never want to do what you want, I think it's a horrible idea, but I tried to, and I succeeded!
What did I do? Easy:
Open Xcode and remove the splash window from the boot (in case it could create some mayhem).
Find Xcode: well, it's hard to explain how, but I found it at /Applications/Xcode.app/Contents/MacOS/Xcode
.
Repeat your mistake:
$ git config core.editor=/Applications/Xcode.app/Contents/MacOS/Xcode
error: invalid key: core.editor=/Applications/Xcode.app/Contents/MacOS/Xcode
Make it right:
$ git config core.editor /Applications/Xcode.app/Contents/MacOS/Xcode
$ echo $?
Cloned a repo, made a silly change, added it to the index.
git commit
, tada!