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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest