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.

1
  • 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 stackoverflow.com/q/6459506/1256452
    – torek
    Commented Dec 17, 2018 at 1:25

2 Answers 2

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

1
0

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

2
  • 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 Commented Dec 17, 2018 at 0:45
  • You can open that file with your favourite editor and simply remove the lines.
    – madhead
    Commented Dec 17, 2018 at 7:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.