Git Change Default Commit Editor

The default git commit editor is vi, but vim can give you colorful editor and better UTF-8 encoding support,so I suggest you change git default commit editor from vi to vim


this is git commit editor in vi











this is git commit editor in vim










you can using command line to change it

$ git config --global core.editor "vim" 


or modify your global git config file

$ vim ~/.gitconfig


add editor = vim in [core] block

[core]
    editor = vim 



留言