How do I change the text editor used by Git to micro?
I like the Micro text editor. I prefer it to nano, personally. However, even when I have it installed, Git defaults to nano. How can I change what text editor git commit uses?
1 Answer
It's pretty easy. All you have to do is this, and the next time you commit, Git will use micro instead of nano.
$ git config --global core.editor "micro"This is pretty flexible. We can set it back to nano:
$ git config --global core.editor "nano"Or we can have it use vi:
$ git config --global core.editor "vi"This will work for most text editors. I only have those three on my system right now, but that should work for others, like emacs, too.