git - 如何使用 git commit 打开 Sublime Text 3 编辑器
问题描述
我已经将 Sublime Text 3 配置为 git Bash 的文本编辑器。输入时 Sublime 成功打开subl 'filePath'
但是,当我尝试 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 中设置默认编辑器以使用 Sublime Text 3。
安装 Sublime Text 3。
打开 Git Bash。
键入此命令:
git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w"
推荐阅读
- angular - 使用 moment.js 在 DatePicker 角度材料上过滤周末
- phpstorm - PhpStorm 无法配置 JSHint
- service-worker - 如何使用 pwa 添加多个应用程序(添加到主屏幕)
- android - 如何从 couchbase 服务器获取每个更改通知?
- python - django import-export 不适用于 mptt
- javascript - 如何防止 Liferay SPA SennaJS 上的多个事件监听器?
- mongodb - MongoDB 4.2 嵌套结果的多重分组
- vbscript - 如何将同一函数的多个 .vbs 脚本合并为一个 .vbs?
- javascript - SVG 线端点独立动画
- python - 根据特定列值计算百分比