【问题标题】:git commit error relevant to ST3与 ST3 相关的 git commit 错误
【发布时间】:2018-09-03 20:19:37
【问题描述】:

我已经创建了一个新的本地存储库并对其进行了初始化,然后我将 ST3 定义为默认编辑器

git config --global core.editor "'C:\Program Files\Sublime Text 3\sublime_text.exe' -w"

当我提交时,我得到了这个错误

hint: Waiting for your editor to close the file... Skipping command-line '"C:\Users\Sony\bin\..\usr\bin\bash.exe"'
('C:\Users\Sony\bin\..\usr\bin\bash.exe' not found)
Need a valid command-line; Edit the string recources accordingly
error: There was a problem with the editor ''C:\Program Files\Sublime Text 3\sublime_text.exe' -w'.
Please supply the message using either -m or -F option

【问题讨论】:

    标签: git sublimetext3


    【解决方案1】:

    改用shown here:

    git config --global core.editor "'C:/Program Files/Sublime Text 3/subl.exe' -w"
    

    这是also documented by GitHub

    由于引号(简单和双引号)的解释方式,从 CMD(而不是 bash 会话)完成时效果会更好。

    【讨论】:

    • 之前做过还是有问题的
    • @IlyesGhomrani 您是在 CMD 会话还是 bash 会话中执行此操作?你当前的 Git 版本是什么?
    • bash 会话,版本:2.16.2
    • @IlyesGhomrani 您可以尝试我在 CMD 会话的答案中提到的相同 git config 命令吗?以及下一次 git commit?
    猜你喜欢
    • 2015-04-02
    • 1970-01-01
    • 2013-06-01
    • 1970-01-01
    • 2021-07-04
    • 2021-06-28
    • 2016-12-04
    • 1970-01-01
    相关资源
    最近更新 更多