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.

1  
This is definitely on-topic for SO. –  Joe Nov 9 '12 at 15:39
    
I don't understand why this was migrated or by who. –  Sunny Juneja Nov 12 '12 at 20:44
add comment

2 Answers

up vote 15 down vote accepted

git config --global core.editor "nano"

More information here:

http://git-scm.com/book/en/Customizing-Git-Git-Configuration

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

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
add comment

Your Answer

 
discard

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