状況
~/.gitconfigに以下のように設定した上でgit commitを実行したところエラーが発生しました。
~/.gitconfig
[core]
editor = code --wait
ターミナル
$ 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.
解消法
以下の方法でpathを通すことで解消しました。
VSCodeを開き、cmd + shif + pを入力。
「シェルコマンド:PATH内にcodeコマンドをインストールします」を実行。
