How to save a git commit message from windows cmd?

This is my first time running git from the command line.

I need to know how does one save the commit message?

  • Which git commit/branch contains this blob?
  • How can I generate the .git *FILE* and how is it (de)constructed?
  • Should Autotools output scripts and Makefiles be included in a repository?
  • How do Git SVN ignore-paths work (ignoring daily build tags)?
  • Git: How to list cherry-picked commits?
  • How to deal with files outside IntelliJ project with Git?
  • I mean what keys should I press to go past this screen:

    Commit message interface

  • How do I start using my repository locally and on Github?
  • Git clone fails with out of memory error - “fatal: out of memory, malloc failed (tried to allocate 905574791 bytes) / fatal: index-pack failed”
  • git-svn problem
  • Equivalent to git clean -xfd ; git reset --hard in Mercurial?
  • Checking out a project's first commit with git
  • Add multiple small git repo's to a larger repository
  • 6 Solutions collect form web for “How to save a git commit message from windows cmd?”

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

    I believe the REAL answer to this question is an explanation as to how you configure what editor to use by default, if you are not comfortable with Vim.

    This is how to configure Notepad for example, useful in Windows:

    git config --global core.editor "notepad"

    Gedit, more Linux friendly:

    git config --global core.editor "gedit"

    You can read the current configuration like this:

    git config core.editor

    You can also commit with git commit -m "Message goes here" That’s easier.

    Press Shift-zz. Saves changes and Quits. Escape didn’t work for me.

    I am using Git Bash in windows. And couldn’t get past this either. My commit messages are simple so I dont want to add another editor atm.

    With the atom editor, you just need to install the git-plus package.

    If you enter git commit but omit to enter a comment using the –m parameter, then Git will open up the default editor for you to edit your check-in note. By default that is Vim. Now you can do two things:

    Alternative 1 – Exit Vim without entering any comment and repeat

    A blank or unsaved comment will be counted as an aborted attempt to commit your changes and you can exit Vim by following these steps:

    1. Press Esc to make sure you are not in edit mode (you can press Esc several times if you are uncertain)

    2. Type :q! enter
      (that is, colon, letter q, exclamation mark, enter), this tells Vim to discard any changes and exit)
      Git will then respond:

      Aborting commit due to empty commit message

      and you are once again free to commit using:

      git commit –m "your comment here"

    Alternative 2 – Use Vim to write a comment

    Follow the following steps to use Vim for writing your comments

    1. Press i to enter Edit Mode (or Insert Mode).
      That will leave you with a blinking cursor on the first line. Add your comment.
      Press Esc to make sure you are not in edit mode (you can press Esc several time if you are uncertain)
    2. Type :wq enter
      (that is colon, letter w, letter q, enter), this will tell Vim to save changes and exit)

    Response from

    Git Baby is a git and github fan, let's start git clone.