簡體   English   中英

當我輸入“git commit”時如何打開Atom

[英]How to make Atom open when I type “git commit”

當我輸入git commit Atom 應該打開,但它沒有。

對於命令提示符上的配置,我鍵入:

config --global core.editor "atom --wait"

當我輸入:

git commit

它說:

hint: waiting for your editor to close the file .......

error: there was a problem with the editor  "atom --wait"

Please supply the message using either -m or -F option.

正如“ Git 提交失敗:“請使用 -m 或 -F 選項提供消息。” “中解釋的那樣,您應該檢查您的git config core.editor值。 它可能指的是帶有空格的路徑,不帶引號。

確保在注冊該編輯器路徑時使用單引號,並在所有注冊的命令表達式周圍使用雙引號,並使用'/'而不是'\'作為路徑分隔符。

git config core.editor "'C:/path/with spaces/xxx.exe' -<someoptions>"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM