DEV Community

Discussion on: Git cheatsheet for beginners

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

I have one important problem on Git CLI on macOS...

How do I change the default text editor? I am too bad at vi. Wanna change it to Nano or Code or something.

Otherwise, I will need vi cheatsheet as well, even when productivity doesn't matter.

Collapse
 
duomly profile image
Duomly

You can setup default editor in the .bash_profile or .zshrc file in your users profile :)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Thanks, found it. A better way, actually.

git config --global core.editor "nano"

And, git config --global --edit, of course.