git: abort commit in the middle of typing message

If your editor can exit with an error code — Git will abort the commit. When using VIM, type

:cq

to exit with an non-zero error code and abort the commit.

Leave a Comment