Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I'm using Git on Mac and need to do a rebase, the Vim editor kicks in by default. I would prefer Nano – could someone please explain how to reconfigure Git to make it use Nano for rebase?

Thank you!

share|improve this question

migrated from Nov 10 '12 at 16:06

This question came from our site for professional and enthusiast programmers.

up vote 55 down vote accepted

git config --global core.editor "nano"

More information here:

share|improve this answer
Thank you, Sunny. – Dimitri Vorontzov Nov 8 '12 at 23:35

If you want to use nano as your editor for all things command line, add this to your bash_profile:

export EDITOR=/usr/bin/nano

This is assuming you're using the system nano. If not, edit to suit where your nano lives (e.g. /usr/local/bin, /opt/local/bin)

Remember to source your bash_profile after setting this or open a new terminal window for the settings to work...

share|improve this answer
That's assuming you use Bash B) – Jorge Orpinel Mar 25 at 23:09

You must log in to answer this question.