editorconfig files but being too prescriptive about how another developer edits a project isn’t right. I don’t want to dictate that kind of thing to any other potential users of my machine. I’m the only person who uses my Mac, so option 1 would work, but it feels like the wrong approach. You can change your git editor at one of three levels: So until the time comes to learn Vim, Nano’s the most sensible editor to use for my commit messages. Its commands are familiar for a Mac user like me, and I’ve been using it for years to edit config files on servers. I’m not opposed to Vim I’ve even got it on my ‘Things to learn’ list, but now’s not the time to learn it – learning Git on the command line is quite enough right now! Enter Nano But when I amend a commit or just run git commit on its own (I can sometimes be a bit trigger-happy with that ⏎ key!) I’m in VIM…įrom there I have to remember to hit i to insert text, then when I’m ready, hit esc, then :, then wq to write and quit. git commit -m 'This is the commit message'.
Most of the time I use a -m flag and type the message in the command, between 's, e.g. Something that has been bugging me since moving from a GUI to command line git has been the default editor for writing commit messages.