Search code examples
gitcommand-lineversion-control

How to close git commit editor?


I just executed a command $ git commit and it opens a new editor. But I'm trying to close that new commit editor. How to do this? I'm using Git for Windows.


Solution

  • Save the file in the editor. If it's Emacs: CTRLX CTRLS to save then CTRLX CTRLC to quit or if it's vi: :wq

    Press esc first to get out from editing. (in windows/vi)