Use nano as the editor in git bash for Windows.

Published on Author YaniLeave a comment

It’s pretty easy to setup the nano editor as the git editor on Windows.

Just follow these steps:

  • Download the nano executable for Windows: https://www.nano-editor.org/dist/win32-support/
  • Rename it to nano.exe and move it to C:\Program Files\Git\mingw64\bin
  • Run the following command in cmd: git config --global core.editor "winpty nano"

And you’re all set. Nano will now be the default editor used for git commands.

Enjoy. 🙂

Sources:
https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058
https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits

Leave a Reply

Your email address will not be published. Required fields are marked *