Exiting vim with a non-zero status

Sep 17, 2017 using tags vim, git

To exit your vim editor with a non-zero exit code, execute :cq.

This is specially useful when you need to bail out of an interactive git rebase.

Exiting your vim session with a non-zero exit status (while in interactive rebase mode) triggers an error similar to Could not execute editor which effectively leaves your tree unchanged.