次要Git问题-更改默认编辑器 [英] Minor Git Issue - Changing Default Editor
问题描述
可能的重复项:
设置git'core.editor'时遇到的问题
我正在尝试将默认的git文本编辑器更改为TextMate,这样在提交时忘记了-m标记将带给我进入TextMate,而不是vi。我有
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
在我的〜/ .gitconfig中,但它仍然向我抛出以下错误:
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.
推荐答案
在以下问题中查看我的答案:设置git'core.editor'时遇到的问题
See my answer in this question: Trouble on setting the git 'core.editor'
由于您已经正确设置了 $ EDITOR
,只需删除git中的条目:
Since you already have $EDITOR
set up correctly, just remove the entries from git:
git config --global --unset-all core.editor
现在再次尝试git commit。
now try a git commit again.
这篇关于次要Git问题-更改默认编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!