有时在执行git rebase -i的时候,弹出的窗口不是自己想要的编辑器。或者由于另外的一些原因,想要在使用git的时候更换一个编辑器,则可以通过git config --global core.editor的命令修改为自己想要的编辑器。

  • 使用git默认编辑器
git config --global core.editor nano
  • 使用vim编辑器
git config --global core.editor vim
  • 使用gedit编辑器
git config --global core.editor gedit
  • 使用notepad++编辑器
git config --global core.editor notepad++ 
  • 使用vscode编辑器
git config --global core.editor Code
  • 使用emacs编辑器
 git config --global core.editor emacs
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐