Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Nov 10 '12 at 16:06

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

2 Answers 2

up vote 38 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.