4

So I encountered an error that said "Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch" and I found a solution to it in this thread.

However one of the answers said, your text editor is the issue so change it to atom, and without knowing how to use an editor in Atom I changed the git editor to Atom via this code:

git config --global core.editor "atom --wait"

I was using Git Bash, and I wanted to return to that as my core editor, but I can't seem to find a way on how I can do that.

P.S. I am a few days into Git, so pardon any elementary mistakes I make.

2 Answers2

4

Try this:

git config --global --unset-all core.editor
Afeef Janjua
  • 649
  • 7
  • 10
2

If you want to set the editor-setting by git to Git Bash command-line, then you can change to the nano-editor like following:

git config --global core.editor "nano"

So if you enter git commit -a after adding files, it would open a file on your terminal where you wrote (e.g. Git Bash) the git-command and you can write there your commit-message.

EDIT:

With the answer from Afeef Janjua you reset back the settings for core.editor and you will have the same settings as before entering ... core.editor "atom --wait".

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34