39
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

初git commit時にエディタが開かない(Pathエラー)解決方法。【VSCodeとGitHubの設定】

Last updated at Posted at 2020-01-05

問題点:GitHubにて 初git commitを実行し、メッセージ入力エディターが開かなかった。


環境: MacBookPro/ vscode バージョン: 1.41.1

  • ①git config --global core.editor 'code --wait' は設定済み

  • ②git commit -m "" では問題なく進める。
    git commit -v では同じエラーが返る

エラー内容↓

$ git commit
hint: Waiting for your editor to close the file... code --wait: code: command not found
error: There was a problem with the editor 'code --wait'.
Please supply the message using either -m or -F option.

code: command not foundと出たため、

####vscodeのPathが原因と思われる。 
####vscodeを開いて設定を行う。####

コマンドパレット( ⌘ + ⇧ + p ) にて 
Shell Command:...を入力、インストール。
(画像赤枠内を実行。)

スクリーンショット 2020-01-04 21.44.24.png

以上で解決。

39
25
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
39
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?