Last Updated: February 25, 2016
·
843
· rodnaph

Abort Git commit in Vim

Have you ever gotten to the point of a Git commit where you're entering the commit message in Vim and realise you need to abort?

:cq

This exits vim with an error code, so Git will not proceed with the commit and you'll be deposited safely back at the shell.