Learn or Die

生涯勉強。Macです。

Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch

エラー内容

gitでリモートのブランチをpullすると、下記のエラーが出ました。
コミットメッセージを入れてください、と書いてあります。 エラーかと思いましたが、ちがいました。

Merge branch 'master' of github.com:xxx/

first
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
Type  :quit<Enter>  to exit Vim

解決方法

コミットメッセージを入力する もしくは コミットを中断する

コミットメッセージを入力する

  1. 「i」を押す(INSERT(挿入)を意味する)
  2. コミットメッセージを書く
  3. 「esc」を押す
  4. 「:wq」と入力
  5. Enterキーを押す

コミットを中断する

  1. 「:quit」と入力
  2. Enterキーを押す