How to save a git commit message from windows cmd?

Jackson Publick picture Jackson Publick · Nov 12, 2012 · Viewed 112.2k times · Source

I run git from the command line.

How does one save the commit message?

I mean what keys should I press to go past this screen:

Commit message interface

Answer

Ikke picture Ikke · Nov 12, 2012

You are inside vim. To save changes and quit, type:

<esc> :wq <enter>

That means:

  • Press Escape. This should make sure you are in command mode
  • type in :wq
  • Press Return

An alternative that stdcall in the comments mentions is:

  • Press Escape
  • Press shift+Z shift+Z (capital Z twice).