【发布时间】:2016-09-22 23:03:42
【问题描述】:
我使用的是 Windows 10,不久前我将默认 Git 编辑器更改为 Notepad++
现在,每当我执行一个打开编辑器的命令时,我都找不到任何方法来保存消息并继续执行命令 - 我最终不得不取消,即CTRL + C
我没有有拥有Notepad++作为编辑器,但我确实需要能够正确使用Git。
我的尝试
- 恢复原始编辑器(我不知道如何)
- 在 Stack Overflow 上发现类似问题
【问题讨论】:
我使用的是 Windows 10,不久前我将默认 Git 编辑器更改为 Notepad++
现在,每当我执行一个打开编辑器的命令时,我都找不到任何方法来保存消息并继续执行命令 - 我最终不得不取消,即CTRL + C
我没有有拥有Notepad++作为编辑器,但我确实需要能够正确使用Git。
我的尝试
【问题讨论】:
恢复原始编辑器(我不知道如何)
你可以试试:
cd /path/to/your/repo
git config --unset-all core.editor
git config -l|grep core.editor
(如果您将<git>/usr/bin添加到Windows %PATH%,则grep可用。<git>是您安装git的路径)
如果这不起作用,您可能必须为您的本地和全局配置删除它:
cd /path/to/your/repo
git config --local --unset-all core.editor
git config --global --unset-all core.editor
git config -l|grep core.editor
【讨论】:
core.editor='C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin