【问题标题】:How to open Sublime Text 3 editor with git commit如何使用 git commit 打开 Sublime Text 3 编辑器
【发布时间】:2020-04-27 15:23:27
【问题描述】:

我已经将 Sublime Text 3 配置为 git Bash 的文本编辑器。当我输入subl 'filePath'时,Sublime 成功打开

但是,当我尝试 git commit 时,文本编辑器无法打开并输出以下错误:

hint: Waiting for your editor to close the file... subl -n -w: subl: command not found
error: There was a problem with the editor 'subl -n -w'.
Please supply the message using either -m or -F option.

我已将文件添加到暂存区并准备提交。

【问题讨论】:

标签: git sublimetext3 git-commit


【解决方案1】:

你可以试试this

您可以在 Git 中设置默认编辑器以使用 Sublime Text 3。

  1. 安装 Sublime Text 3。

  2. 打开 Git Bash。

  3. 键入此命令:

git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w"

【讨论】:

  • 这行得通,谢谢!请您详细说明出了什么问题?
猜你喜欢
  • 2023-04-10
  • 1970-01-01
  • 1970-01-01
  • 2015-09-04
  • 1970-01-01
  • 2023-03-07
  • 2015-02-21
  • 2017-05-14
相关资源
最近更新 更多