还原Git编辑器

时间:2018-12-17 00:24:14

标签: git text-editor git-revert

我试图更改Git的本机代码编辑器,但未成功完成。现在,每当我尝试还原提交时,都会出现以下错误:

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.

我想知道如何重置或删除尝试进行的修改。

2 个答案:

答案 0 :(得分:0)

只需在editor[core])的~/.gitconfig部分下找到并修复C:\Users\<user>\.gitconfig设置。

答案 1 :(得分:-2)

从全局和本地配置中删除设置:

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

默认编辑器为vim,很难理解它,因此您最好设置一个不同的,更熟悉的编辑器。见

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

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