DEV Community


Self-note: Try this to write a commit message when you're stuck in VIM

akiramakes profile image Akira ・1 min read

Maybe this will help you.

When git pulling master into a feature branch, you may get this error:

Merge branch 'master' of xxxxxxxx into xxxxxxxxx

Please enter a commit message to explain why this merge is necessary,

especially if it merges an updated upstream into a topic branch.

Ah, stuck in VIM.

Here's what I did. It seemed to work.

cntrl x + cntrl v + commit message + :wq

If that doesn't help, try this thread from stackoverflow


Discussion (3)

darkwiiplayer profile image

Best way to exit vim:

  • Spam Escape a bunch of times
  • :xa to save all work and exit
  • qa! to discard all changes and exit

(or, you know, one of the many funny alternatives)

akiramakes profile image
Akira Author

ahhhh :xa worked! you're a godsend.

akiramakes profile image
Akira Author

Thank you!! This git repo is simultaneously hilarious and terrifying. :D Good find.

Forem Open with the Forem app