83

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!

migrated from stackoverflow.com Nov 10 '12 at 16:06

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

  • 1
    I prefer nano too, I am no masochist. – Rolf Sep 22 '17 at 10:31
142

git config --global core.editor "nano"

More information here:

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

27

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...

  • That's assuming you use Bash B) – Jorge Orpinel Mar 25 '16 at 23:09
  • 3
    You should be able to use simply export EDITOR=nano. – Radon Rosborough Oct 18 '16 at 3:20

Your Answer

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