【问题标题】:An error occurred while trying to change an Older Commit message [duplicate]尝试更改旧提交消息时出错 [重复]
【发布时间】:2023-03-14 05:44:01
【问题描述】:

我使用 交互式 rebase 工具 git rebase -i HEAD~N 来检索较旧的提交,但它在终端上引发以下错误。

提示:等待编辑器关闭文件... 括号 -n -w: 括号:找不到命令

错误:编辑器“括号 -n -w”有问题。

注意:我什至没有在我的 Mac 上安装括号编辑器。很久以前就卸载了。

关于如何解决此问题的任何建议?

谢谢

【问题讨论】:

标签: git


【解决方案1】:

配置你的 git 以使用你想要的编辑器,例如:

git config --global core.editor vim

然后再次运行 rebase。

【讨论】:

  • Visual Studio 代码编辑器的命令是什么? git config --global core.editor vscgit config --global core.editor visual studio code 我都试过了,但都没有成功。
  • code --help git config --global core.editor "code --wait" git config --global -e
猜你喜欢
  • 2021-02-06
  • 1970-01-01
  • 2016-05-23
  • 2013-08-15
  • 2010-12-25
  • 2021-10-05
  • 2018-12-30
  • 1970-01-01
  • 2016-03-01
相关资源
最近更新 更多