我下载了Git并添加了"sublimetext3"作为值core.editor
而不是"subl -n -w"。 我现在添加了"subl -n -w"作为core.editor
值,但是当我键入core.editor
值"sublimetext3"时也存在git config --list
另外,我无法在终端中打开.md文件。 我键入Contributors.md
并得到响应
-bash: Contributors.md: command not found.
当我尝试git config --edit
时,我得到以下内容:
error: cannot run sublimetext3: No such file or directory
error: unable to start editor 'sublimetext3'.
检查您的本地和全局配置,并进行比较:
git config --local --list
git config --global --list
您可能已将其设置为具有subl
的一个级别,但被另一个设置覆盖
sublimetext3
如果是这样,要正确设置它,请在设置属性时显式给出配置级别:
git config --global core.editor "subl -n -w"
# and/or
git config --local core.editor "subl -n -w"
(我没有提到--system
,--worktree
或--file
也存在,因为我想你不太可能在不知情的情况下改变它,但可能值得检查,请参阅文档中的所有详细信息(