LoginSignup
7
7

More than 5 years have passed since last update.

Cloud9 のエディタで git のコミットメッセージを書く

Posted at

Cloud9 のターミナルから git commit するとコミットメッセージを入力するために nano が立ち上がります。nano は使いづらいのでそれ以外のエディタを使いたいけど、vim にするのも何か違うような気がします。

せっかく IDE なのでコミットメッセージも Cloud9 のエディタで入力するようにします。

git config --global core.editor 'c9 open --wait'

c9 コマンドでファイルを開く

ターミナルから Cloud9 のエディタ (ACE) でファイルを開くには c9 コマンドを使います。

c9 open path

ただし、ファイルを開いてすぐにプロンプトが戻るので、このままでは git のコミットメッセージ入力には使えません。

--wait オプションを付けるとエディタが終了するまでプロンプトに戻りませんので、git のエディタとして使えるようになります。

7
7
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
7
7