Writing a git commit message

Git commit messages

Context: You’ve merged a branch to master/main and you get this message. See original stackoverflow question for more context:

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

You try typing a message or hitting enter or escaping and nothing happens. This is not an error message. Git is using your default editor. Here’s what to do:

  1. press “i” (i for insert)
  2. write your merge message
  3. press “esc” (escape)
  4. write “:wq” (write & quite)
  5. then press enter
Previous
Next