Minor Git Issue - Changing Default Editor [duplicate]

不想你离开。 提交于 2019-12-11 02:18:51

问题


Possible Duplicates:
How can I set up an editor to work with Git on Windows?
Trouble on setting the git 'core.editor'

I'm trying to change my default git text editor to TextMate, such that forgetting the -m tag on a commit will bring me into TextMate and not vi. I have

[core]
editor = mate -w

in my ~/.gitconfig, but it still throws the following error at me:

error: cannot run TextMate: No such file or directory
error: There was a problem with the editor 'TextMate'.
Please supply the message using either -m or -F option.

Fiddled around with various guides on how to set/unset the core editor, and couldn't really find anything that worked so I'm here for a pick-me-up.


回答1:


See my answer in this question: Trouble on setting the git 'core.editor'


Since you already have $EDITOR set up correctly, just remove the entries from git:

git config --global --unset-all core.editor

now try a git commit again.



来源:https://stackoverflow.com/questions/6459506/minor-git-issue-changing-default-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!