Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git open default git editor instead of VIM or any other editor (Git Rebase) [duplicate]

I recently installed Vim. Now, when I rebase my branch in interactive mode, Git automatically opens Vim.

However, I do not want to open Vim in interactive mode; instead, I want to open default Git interactive mode editor. How can I set the default interactive editor used by Git?

like image 951
Jaykumar Patel Avatar asked Feb 23 '15 08:02

Jaykumar Patel


People also ask

What should I set as git default editor?

On Windows, if you use Git Bash the default editor will be Vim. Vim is another text editor, like nano or notepad.

How do I set git as default editor in Windows?

By configuring git config core. editor notepad , users can now use notepad.exe as their default editor. Configuring git config format. commitMessageColumns 72 will be picked up by the notepad wrapper and line-wrap the commit message after the user edits it.


1 Answers

I think what you want is to use nano (which is the default text editor on Ubuntu), you can set that up by:

git config --global core.editor "nano"
like image 91
halafi Avatar answered Oct 12 '22 02:10

halafi