How do I save a commit message and quit Vim properly when using Git?

If Vim is feeling like a challenge, no worries, you can change your default editor in Git! For example, if you prefer Nano, run this command:

git config --global core.editor "nano"

But if you’re already in Vim:

  1. Press Esc to enter normal mode.
  2. Type :wq and hit Enter.
  3. Boom, your commit message is saved!

It took me a couple of tries to get comfortable with Vim too, but once you get the flow, saving and quitting is a breeze!