![](/img/trans.png)
[英]How do I set up my terminal on Mac to auto open Sublime Text Editor when using git commit command?
[英]How to open Sublime Text 3 editor with git commit
我已經將 Sublime Text 3 配置為 git Bash 的文本編輯器。當我鍵入subl 'filePath'
時,Sublime 成功打開
但是,當我嘗試 git 提交時,文本編輯器無法打開並輸出以下錯誤:
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"
我在Mac上使用了以下命令並且它有效
$ git config --global core.editor "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -n -w"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.