6

I attempted to change the native code editor for Git, but I have done it unsuccessfully. Now, anytime I attempt to revert a commit, I get the following error:

hint: Waiting for your editor to close the file... notepad++.exe -wl1: notepad++.exe: command not found
error: There was a problem with the editor 'notepad++.exe -wl1'.
Please supply the message using either -m or -F option.

I was wondering how I go about resetting or removing the attempted modification I made.

madhead
  • 31,729
  • 16
  • 153
  • 201
Theodore Steiner
  • 1,553
  • 2
  • 23
  • 34
  • So is your question about *reverting commits* (a very specific thing in Git, using the `git revert` command), or is it about *updating your configuration settings?* If the latter, see https://stackoverflow.com/q/6459506/1256452 – torek Dec 17 '18 at 01:25

2 Answers2

8

Remove the settings from the global and local configs:

git config --global --unset-all core.editor
git config --unset-all core.editor

Default editor is vim, it's a bit hard to grasp it so you better set a different, more familiar editor. See

How do I make Git use the editor of my choice for commits?

and https://stackoverflow.com/search?q=%5Bgit%5D+core.editor

phd
  • 82,685
  • 13
  • 120
  • 165
0

Just find and fix an editor setting under [core] section in your ~/.gitconfig (C:\Users\<user>\.gitconfig).

madhead
  • 31,729
  • 16
  • 153
  • 201
  • But how do I go about removing the entry I have there from hte command line, and return it to whatever its default would have been, had I not tried to change anything – Theodore Steiner Dec 17 '18 at 00:45
  • You can open that file with your favourite editor and simply remove the lines. – madhead Dec 17 '18 at 07:10