Every user have their favorate editor. Some use VI other uses emacs. This post will help you on how to see what is the text editor in GIT and how change it to your favorate editor. Changing an editor is done in many ways for GIT, either we can edit main git configuration file ~/.gitconfig or we can use "git config" command to set it.

So what is my default editor for my git?

To know it we have to use git command or open ~/.gitconfig file.

	git config core.editor

Output:

	○ → git config core.editor
vim

or

	grep editor ~/.gitconfig
 
	Output:
        editor = vim


Change default GIT editor to your favorate one with a command

	git config --global core.editor editor_name

Example: I want to set vim as my default editor to do that follow below command

	git config --global core.editor vim

change default GIT editor by editing ~/.gitconfig
Enter below entry in to the file under [core] section

	editor = vim

Check if your editor is updated or not with following commands

	git config core.editor
or
grep editor ~/.gitconfig
The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.