DEV Community 👩‍💻👨‍💻


Posted on

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

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


Top comments (3)

darkwiiplayer profile image
𒊩Wii 💖💛💚💙💜💝💟

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.

🤔 Did you know?

📚 You can adjust your experience level in Settings to see more relevant content.