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

bernie2436 picture bernie2436 · Sep 30, 2013 · Viewed 467.7k times · Source

I am using Git. I did a pull from a remote repo and got an error message:

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

I try to type a message and press Enter but nothing happens.

How do I tell Git/Terminal I am done typing in my message?

I am using Terminal on OS X.

Answer

Saad.elzwawy picture Saad.elzwawy · Sep 30, 2013

It's not a Git error message, it's the editor as git uses your default editor.

To solve this:

  1. press "i" (i for insert)
  2. write your merge message
  3. press "esc" (escape)
  4. write ":wq" (write & quit)
  5. then press enter