git merge実行時に「Please enter a commit message to explain why this merge is necessary」が表示される

  • 作成日 2021.03.02
  • 更新日 2022.03.02
  • git
git merge実行時に「Please enter a commit message to explain why this merge is necessary」が表示される

git mergeコマンド実行時に「Please enter a commit message to explain why this merge is necessary」の対応方法を記述してます。

環境

  • OS windows10 pro
  • git 2.30.1

詳細

git merge実行時に発生

Merge branch 'hoge'
# 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.
~

対応方法

単純に「vi」エディタが起動しただけ、特にメッセージを残すことがなければ「:q!」と入力して「ENTER」キーを押下すれば「vi」エディタは終了します。

:q!