How to Set Nano as the Default Editor for Git on Your Mac
Matt Cone August 15, 2021 Tutorials Mac Developer
If you’re a developer who uses git for version control on your Mac, you’ll want to set a default text editor for git. There are certain situations when git opens a text editor for you — for example, when you need to rebase or resolve merge conflicts. By default, git is set to use vim, but you can easily change git to use another text editor.
Nano is a simple text editor and it makes a great choice for beginners or anyone who prefers a simpler text editor when working with git. You can set git to use the nano text editor with a single command.
Enter the following command in your terminal application to set nano as the default git editor on your Mac:
git config --global core.editor "nano"
You’ve successfully set git to use nano as the default text editor. From now on, when git opens a text editor, it will open nano. For more information on customizing your git configuration, see the documentation.
Related Articles
Subscribe to our email newsletter
Sign up and get Macinstruct's tutorials delivered to your inbox. No spam, promise!