Search code examples
gitgit-commit

How to save a git commit message from windows cmd?


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


Solution

  • 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).