我使用 Windows 10,不久前我将默认的 Git 编辑器更改为 Notepad++
现在,每当我执行一个命令来调出编辑器时,我都找不到任何方法来保存消息并继续执行命令 - 我最终不得不取消,即 CTRL
+ C
我没有将 Notepad++
作为编辑器,但我确实需要能够正确使用 Git。
我尝试过的
- 恢复原来的编辑器(我不知道怎么做)
- 在 Stack Overflow 上找到类似的问题
最佳答案
Restoring the original editor (I wasn't able to find out how)
你可以试试:
cd /path/to/your/repo
git config --unset-all core.editor
git config -l|grep core.editor
( 如果将 grep
添加到 Windows <git>/usr/bin
中,%PATH%
可用。
<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
关于windows - 将 Git 核心编辑器更改为 Notepad++ 导致问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37435493/