Git: Forcing git to use vim for commit messages

If you are in the vim camp, you may not appreciate git forcing you to emacs when committing.  First, let me remind you how to save and then quit for emacs if you do get forced into that editor.

CTRL-X CTRL-S (to save) then CTRL-X CTRL-C (to quit)

And if you would like to avoid emacs as the default commit message editor, you can change the default using:

git config --global --list
git config --global core.editor vim

Of course, avoiding any type of editor at all is the fastest way.

git commit -m "this is my commit message"

REFERENCES

https://stackoverflow.com/questions/13239368/git-how-to-close-commit-editor (how to save then quit with emacs)

https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits (changing the default git commit message editor)

NOTES

Setting default editor for Ubuntu (mg is gnuemacs)

sudo update-alternatives --config editor