几天前我开始使用 emacs,在 emacs shell (M-x shell) 中使用 git 时遇到了问题。当我“git commit”或“git commit --amend”时,它会打开 vim 以编辑和保存提交消息。我同意,但我找不到保存和退出 vim 的方法,因为按 ESC 不会触发 vim 正常模式,而 ESC 是我的 emacs 元键。 我尝试将我的 git 编辑器更改为 emacs,但它也不起作用,似乎 emacs shell 无法运行 emacs,并且它没有像我想象的那样打开一个新缓冲区。
emacs: Terminal type "dumb" is not powerful enough to run Emacs.
有没有一种方法可以让我在 emacs shell 中使用 git 命令行(我宁愿不必使用像 magit 这样的 git 前端客户端,...)?
谢谢, 罗宾
最佳答案
你可以把你的编辑器改成更简单的东西,比如nano,使用
git config core.editor nano
或者您可以通过将您的消息放在命令行上来让它不打开任何编辑器:
git commit --amend -m "My message"
关于git - Emacs shell : save commit message,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39528255/