GIT Tip for Newbies: Change your default command line editor in 3 Steps

Writing a commit message in GIT is an essential part of leveraging version control. The default editor in GIT is the popular VIM. What if your not a huge fan of VIM? Perhaps you have not had the chance to learn VIM and for now you would like to stick with another editor such as PICO or NANO.

No worries, changing GIT's default editor is super easy. We will show you how to do it in 3 steps:

  1. View your config settings in GIT with this command:
    git config --list
    That should print out all of your GIT specific configuration settings.

    If you were successful in getting the command to work then you may have noticed this line:
    This setting is what we need to change.

  2. Set the editor to our desired preference by running this command:
    git config --global core.editor "pico"
    Notice the editor name in double quotes!

  3. Re-run the list command to verify:
    git config --list
    If you can see:
    you are all set!

Reference: Stack Overflow